From 473f8234f974c512aedef9f9fb1743778ead5c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tin=20Tvrtkovi=C4=87?= Date: Mon, 10 Mar 2025 15:37:55 +0100 Subject: [PATCH 1/7] Add 3.14 to Trove classifiers --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 024a16023..a70a4231c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Typing :: Typed", From 35bb48b791642d29e7f0ef512bf2d6cb374d318c Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Sun, 11 May 2025 09:29:02 +0200 Subject: [PATCH 2/7] Skip pytest-mypy-plugins on 3.14 Until it works. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a70a4231c..521461d2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ dynamic = ["version", "readme"] [project.optional-dependencies] tests-mypy = [ - 'pytest-mypy-plugins; platform_python_implementation == "CPython" and python_version >= "3.10"', + 'pytest-mypy-plugins; platform_python_implementation == "CPython" and python_version >= "3.10" and python_version < "3.14"', # Since the mypy error messages keep changing, we have to keep updating this # pin. 'mypy>=1.11.1; platform_python_implementation == "CPython" and python_version >= "3.10"', From 7b89930c7e7411470c55d3ddc4c614ccd84edc70 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Sun, 11 May 2025 09:29:10 +0200 Subject: [PATCH 3/7] Run tests on 3.14 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 585c3c7c9..4839f30aa 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ min_version = 4 env_list = pre-commit, - py3{8,9,10,11,12,13}-tests, + py3{8,9,10,11,12,13,14}-tests, py3{10,11,12,13}-mypy, pypy3-tests, pyright, From 6c65d6338d3748939801fae4439e84870b98a8bf Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Sun, 11 May 2025 09:30:53 +0200 Subject: [PATCH 4/7] Add explanations --- pyproject.toml | 1 + tox.ini | 1 + 2 files changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 521461d2a..5212fcc3c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ dynamic = ["version", "readme"] [project.optional-dependencies] tests-mypy = [ + # A transitive dependency of pytest-mypy-plugins doesn't build on 3.14 yet. 'pytest-mypy-plugins; platform_python_implementation == "CPython" and python_version >= "3.10" and python_version < "3.14"', # Since the mypy error messages keep changing, we have to keep updating this # pin. diff --git a/tox.ini b/tox.ini index 4839f30aa..1ca8e2f24 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] min_version = 4 +# Mypy doesn't run on 3.14 yet. env_list = pre-commit, py3{8,9,10,11,12,13,14}-tests, From d119bc82d13e29efb374abe8e3822d81257efaa8 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 19 May 2025 12:14:19 -0400 Subject: [PATCH 5/7] References work now --- tests/test_annotations.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/test_annotations.py b/tests/test_annotations.py index 5c6296634..e193d4ba1 100644 --- a/tests/test_annotations.py +++ b/tests/test_annotations.py @@ -13,7 +13,6 @@ import attr import attrs -from attr._compat import PY_3_14_PLUS from attr._make import _is_class_var from attr.exceptions import UnannotatedAttributeError @@ -588,8 +587,6 @@ def test_self_reference(self, slots): """ References to self class using quotes can be resolved. """ - if PY_3_14_PLUS and not slots: - pytest.xfail("References are changing a lot in 3.14.") @attr.s(slots=slots, auto_attribs=True) class A: @@ -605,8 +602,6 @@ def test_forward_reference(self, slots): """ Forward references can be resolved. """ - if PY_3_14_PLUS and not slots: - pytest.xfail("Forward references are changing a lot in 3.14.") @attr.s(slots=slots, auto_attribs=True) class A: From c427499f45074ba97f08cbb6303f1cb4acb54b64 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 19 May 2025 12:21:51 -0400 Subject: [PATCH 6/7] Try if GHA has 3.14b1 if uv has not --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70f3fadfb..0000f15e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,10 @@ jobs: name: Packages path: dist - run: tar xf dist/*.tar.gz --strip-components=1 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + allow-prereleases: true - uses: hynek/setup-cached-uv@v2 - name: Prepare tox From 42a400c68b58738dbd102f22ff01aa652c3c6af5 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 19 May 2025 12:24:25 -0400 Subject: [PATCH 7/7] Skip Mypy on 3.14 for now --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0000f15e7..59cfb8c13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: run: | DO_MYPY=1 - if [[ "$V" == "3.8" || "$V" == "3.9" ]]; then + if [[ "$V" == "3.8" || "$V" == "3.9" || "$V" == "3.14" ]]; then DO_MYPY=0 fi