Skip to content

Commit 38263d8

Browse files
authored
feat: Python 3.14 support (#300)
* feat: Python 3.14 support * Update pyproject.toml * Update test_numpy.py * Update test_pil.py * only test third-party on Linux and Python 3.13 * dot not pin third-party, abd test on all supported Python versions * revert
1 parent f050649 commit 38263d8

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ jobs:
6363
- name: CPython 3.12
6464
runs-on: "3.12"
6565
- name: CPython 3.13
66-
runs-on: "3.13-dev"
66+
runs-on: "3.13"
67+
- name: CPython 3.14
68+
runs-on: "3.14-dev"
6769
steps:
6870
- uses: actions/checkout@v4
6971
- uses: actions/setup-python@v5

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ See Git checking messages for full history.
55
## 10.0.0 (2024-xx-xx)
66
- removed support for Python 3.8
77
- removed support for Python 3.9
8+
- added support for Python 3.14
89
- :heart: contributors: @
910

1011
## 9.0.2 (2024-09-01)

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ classifiers = [
3535
"Programming Language :: Python :: 3.11",
3636
"Programming Language :: Python :: 3.12",
3737
"Programming Language :: Python :: 3.13",
38+
"Programming Language :: Python :: 3.14",
3839
"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture",
3940
"Topic :: Software Development :: Libraries",
4041
]
@@ -73,14 +74,13 @@ dev = [
7374
"mypy==1.13.0",
7475
"ruff==0.7.3",
7576
"twine==5.1.1",
76-
"wheel==0.45.0",
7777
]
7878
docs = [
7979
"sphinx==8.1.3",
8080
]
8181
tests = [
82-
"numpy==2.1.3 ; sys_platform == 'windows' and python_version >= '3.13'",
83-
"pillow==11.0.0",
82+
"numpy==2.1.3 ; sys_platform == 'linux' and python_version == '3.13'",
83+
"pillow==11.0.0 ; sys_platform == 'linux' and python_version == '3.13'",
8484
"pytest==8.3.3",
8585
"pytest-cov==6.0.0",
8686
"pytest-rerunfailures==14.0.0",

src/tests/third_party/test_numpy.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99

1010
from mss import mss
1111

12-
pytest.importorskip("numpy", reason="Numpy module not available.")
13-
14-
import numpy as np # noqa: E402
12+
np = pytest.importorskip("numpy", reason="Numpy module not available.")
1513

1614

1715
def test_numpy(pixel_ratio: int) -> None:

src/tests/third_party/test_pil.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010

1111
from mss import mss
1212

13-
pytest.importorskip("PIL", reason="PIL module not available.")
14-
15-
from PIL import Image # noqa: E402
13+
Image = pytest.importorskip("PIL.Image", reason="PIL module not available.")
1614

1715

1816
def test_pil() -> None:

0 commit comments

Comments
 (0)