Skip to content

Commit d307e81

Browse files
feat: support python 3.12 (#24)
* test: testpy312 * style(pre-commit.ci): auto fixes [...] * fix: tests * change matrix * broaden ignore * test napari on 311 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c1ba9e2 commit d307e81

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,15 @@ jobs:
2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
python-version: ["3.8", "3.9", "3.10", "3.11"]
31+
python-version: ["3.8", "3.12"]
3232
platform: [ubuntu-latest, macos-latest, windows-latest]
33+
include:
34+
- python-version: "3.9"
35+
platform: ubuntu-latest
36+
- python-version: "3.10"
37+
platform: ubuntu-latest
38+
- python-version: "3.11"
39+
platform: ubuntu-latest
3340

3441
steps:
3542
- name: Cancel Previous Runs

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ classifiers = [
1919
"Programming Language :: Python :: 3.9",
2020
"Programming Language :: Python :: 3.10",
2121
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
2223
]
2324
dynamic = ["version"]
2425
dependencies = ["numpy"]
@@ -131,7 +132,8 @@ filterwarnings = [
131132
"error",
132133
"ignore:distutils Version classes are deprecated",
133134
"ignore:`np.bool8` is a deprecated:DeprecationWarning",
134-
135+
"ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning",
136+
"ignore::DeprecationWarning:docstring_parser",
135137
]
136138

137139
# https://mypy.readthedocs.io/en/stable/config_file.html

tests/test_third_party.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_matplotlib() -> None:
5050
plt.imshow(IMG, cmap=CMAP.to_mpl())
5151

5252

53-
@pytest.mark.skipif(sys.version_info >= (3, 11), reason="napari not working on py3.11")
53+
@pytest.mark.skipif(sys.version_info >= (3, 12), reason="napari not working on py3.12")
5454
def test_napari(qapp: "QApplication") -> None:
5555
napari = pytest.importorskip("napari")
5656

0 commit comments

Comments
 (0)