Skip to content

Commit 901bfaa

Browse files
Tinchehynek
andauthored
Add 3.14 to Trove classifiers (#1415)
* Add 3.14 to Trove classifiers * Skip pytest-mypy-plugins on 3.14 Until it works. * Run tests on 3.14 * Add explanations * References work now * Try if GHA has 3.14b1 if uv has not * Skip Mypy on 3.14 for now --------- Co-authored-by: Hynek Schlawack <[email protected]>
1 parent 755b177 commit 901bfaa

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ jobs:
5454
name: Packages
5555
path: dist
5656
- run: tar xf dist/*.tar.gz --strip-components=1
57+
- uses: actions/setup-python@v5
58+
with:
59+
python-version: ${{ matrix.python-version }}
60+
allow-prereleases: true
5761
- uses: hynek/setup-cached-uv@v2
5862

5963
- name: Prepare tox
@@ -62,7 +66,7 @@ jobs:
6266
run: |
6367
DO_MYPY=1
6468
65-
if [[ "$V" == "3.8" || "$V" == "3.9" ]]; then
69+
if [[ "$V" == "3.8" || "$V" == "3.9" || "$V" == "3.14" ]]; then
6670
DO_MYPY=0
6771
fi
6872

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ classifiers = [
2121
"Programming Language :: Python :: 3.11",
2222
"Programming Language :: Python :: 3.12",
2323
"Programming Language :: Python :: 3.13",
24+
"Programming Language :: Python :: 3.14",
2425
"Programming Language :: Python :: Implementation :: CPython",
2526
"Programming Language :: Python :: Implementation :: PyPy",
2627
"Typing :: Typed",
@@ -30,7 +31,8 @@ dynamic = ["version", "readme"]
3031

3132
[project.optional-dependencies]
3233
tests-mypy = [
33-
'pytest-mypy-plugins; platform_python_implementation == "CPython" and python_version >= "3.10"',
34+
# A transitive dependency of pytest-mypy-plugins doesn't build on 3.14 yet.
35+
'pytest-mypy-plugins; platform_python_implementation == "CPython" and python_version >= "3.10" and python_version < "3.14"',
3436
# Since the mypy error messages keep changing, we have to keep updating this
3537
# pin.
3638
'mypy>=1.11.1; platform_python_implementation == "CPython" and python_version >= "3.10"',

tests/test_annotations.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import attr
1414
import attrs
1515

16-
from attr._compat import PY_3_14_PLUS
1716
from attr._make import _is_class_var
1817
from attr.exceptions import UnannotatedAttributeError
1918

@@ -588,8 +587,6 @@ def test_self_reference(self, slots):
588587
"""
589588
References to self class using quotes can be resolved.
590589
"""
591-
if PY_3_14_PLUS and not slots:
592-
pytest.xfail("References are changing a lot in 3.14.")
593590

594591
@attr.s(slots=slots, auto_attribs=True)
595592
class A:
@@ -605,8 +602,6 @@ def test_forward_reference(self, slots):
605602
"""
606603
Forward references can be resolved.
607604
"""
608-
if PY_3_14_PLUS and not slots:
609-
pytest.xfail("Forward references are changing a lot in 3.14.")
610605

611606
@attr.s(slots=slots, auto_attribs=True)
612607
class A:

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[tox]
22
min_version = 4
3+
# Mypy doesn't run on 3.14 yet.
34
env_list =
45
pre-commit,
5-
py3{8,9,10,11,12,13}-tests,
6+
py3{8,9,10,11,12,13,14}-tests,
67
py3{10,11,12,13}-mypy,
78
pypy3-tests,
89
pyright,

0 commit comments

Comments
 (0)