diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70f3fadfb..59cfb8c13 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 @@ -62,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 diff --git a/pyproject.toml b/pyproject.toml index 024a16023..5212fcc3c 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", @@ -30,7 +31,8 @@ dynamic = ["version", "readme"] [project.optional-dependencies] tests-mypy = [ - 'pytest-mypy-plugins; platform_python_implementation == "CPython" and python_version >= "3.10"', + # 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. 'mypy>=1.11.1; platform_python_implementation == "CPython" and python_version >= "3.10"', 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: diff --git a/tox.ini b/tox.ini index 585c3c7c9..1ca8e2f24 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,9 @@ [tox] min_version = 4 +# Mypy doesn't run on 3.14 yet. 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,