From dc340e3d1c3b2856e07a8c82634663ea70b78746 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 14 Feb 2025 11:29:12 -0500 Subject: [PATCH 1/4] Omit orjson test requirement on Python 3.14 for now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It doesn’t yet "pip install" on 3.14. --- test-requirements.in | 2 +- test-requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test-requirements.in b/test-requirements.in index 2e29cda42..bf64c568d 100644 --- a/test-requirements.in +++ b/test-requirements.in @@ -12,7 +12,7 @@ cryptography>=41.0.0 # cryptography<41 segfaults on pypy3.10 # Tools black; implementation_name == "cpython" mypy # Would use mypy[faster-cache], but orjson has build issues on pypy -orjson; implementation_name == "cpython" +orjson; implementation_name == "cpython" and python_version < "3.14" # orjson does not yet install on 3.14 ruff >= 0.8.0 astor # code generation uv >= 0.2.24 diff --git a/test-requirements.txt b/test-requirements.txt index 2865e4c4a..8a53682a6 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -92,7 +92,7 @@ nodeenv==1.9.1 # via # pre-commit # pyright -orjson==3.10.15 ; implementation_name == 'cpython' +orjson==3.10.15 ; python_full_version < '3.14' and implementation_name == 'cpython' # via -r test-requirements.in outcome==1.3.0.post0 # via -r test-requirements.in From 02b338ebab972ffe16bca14bdd5823db9ab61631 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 14 Feb 2025 11:34:59 -0500 Subject: [PATCH 2/4] Add xfail to test_ki_protection_doesnt_leave_cyclic_garbage on Python 3.14 Fixes #3209; works around https://github.com/python/cpython/issues/125603. --- src/trio/_core/_tests/test_run.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/trio/_core/_tests/test_run.py b/src/trio/_core/_tests/test_run.py index 289a35667..46ee59f00 100644 --- a/src/trio/_core/_tests/test_run.py +++ b/src/trio/_core/_tests/test_run.py @@ -2817,6 +2817,11 @@ def no_other_refs() -> list[object]: sys.implementation.name != "cpython", reason="Only makes sense with refcounting GC", ) +@pytest.mark.xfail( + sys.version_info >= (3, 14), + reason="https://github.com/python/cpython/issues/125603", + strict=True, +) async def test_ki_protection_doesnt_leave_cyclic_garbage() -> None: class MyException(Exception): pass From 51f61850a3b193cb012292dab1b3e066f707298d Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 14 Feb 2025 11:36:41 -0500 Subject: [PATCH 3/4] Add Python 3.14 to CI test matrices --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4489e609..9f4646e74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,7 +155,7 @@ jobs: strategy: fail-fast: false matrix: - python: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] arch: ['x86', 'x64'] lsp: [''] lsp_extract_file: [''] @@ -237,7 +237,7 @@ jobs: strategy: fail-fast: false matrix: - python: ['pypy-3.10', '3.9', '3.10', '3.11', '3.12', '3.13'] + python: ['pypy-3.10', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] check_formatting: ['0'] no_test_requirements: ['0'] extra_name: [''] @@ -301,7 +301,7 @@ jobs: strategy: fail-fast: false matrix: - python: ['pypy-3.10', '3.9', '3.10', '3.11', '3.12', '3.13'] + python: ['pypy-3.10', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] continue-on-error: >- ${{ ( From 6b63492a33f58439086b0c8f40723949609b906c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 14 Feb 2025 15:46:58 -0500 Subject: [PATCH 4/4] =?UTF-8?q?Don=E2=80=99t=20reiterate=20strict=3DTrue,?= =?UTF-8?q?=20since=20we=20have=20xfail=5Fstrict=20=3D=20True?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/trio/_core/_tests/test_run.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/trio/_core/_tests/test_run.py b/src/trio/_core/_tests/test_run.py index 46ee59f00..7728a6f3d 100644 --- a/src/trio/_core/_tests/test_run.py +++ b/src/trio/_core/_tests/test_run.py @@ -2820,7 +2820,6 @@ def no_other_refs() -> list[object]: @pytest.mark.xfail( sys.version_info >= (3, 14), reason="https://github.com/python/cpython/issues/125603", - strict=True, ) async def test_ki_protection_doesnt_leave_cyclic_garbage() -> None: class MyException(Exception):