Skip to content

Commit

Permalink
feat: support python 3.12 (#24)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
tlambert03 and pre-commit-ci[bot] authored Oct 8, 2023
1 parent c1ba9e2 commit d307e81
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,15 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.12"]
platform: [ubuntu-latest, macos-latest, windows-latest]
include:
- python-version: "3.9"
platform: ubuntu-latest
- python-version: "3.10"
platform: ubuntu-latest
- python-version: "3.11"
platform: ubuntu-latest

steps:
- name: Cancel Previous Runs
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dynamic = ["version"]
dependencies = ["numpy"]
Expand Down Expand Up @@ -131,7 +132,8 @@ filterwarnings = [
"error",
"ignore:distutils Version classes are deprecated",
"ignore:`np.bool8` is a deprecated:DeprecationWarning",

"ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning",
"ignore::DeprecationWarning:docstring_parser",
]

# https://mypy.readthedocs.io/en/stable/config_file.html
Expand Down
2 changes: 1 addition & 1 deletion tests/test_third_party.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_matplotlib() -> None:
plt.imshow(IMG, cmap=CMAP.to_mpl())


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

Expand Down

0 comments on commit d307e81

Please sign in to comment.