From 859215098357c14993dfe7f9a6820de5d5161030 Mon Sep 17 00:00:00 2001
From: jakkdl
Date: Mon, 12 May 2025 11:51:45 +0200
Subject: [PATCH 1/7] skip static introspection on 3.14.0b1
---
src/trio/_tests/test_exports.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/trio/_tests/test_exports.py b/src/trio/_tests/test_exports.py
index 0bf619e3b8..61d5e944e0 100644
--- a/src/trio/_tests/test_exports.py
+++ b/src/trio/_tests/test_exports.py
@@ -117,6 +117,10 @@ def iter_modules(
# won't be reflected in trio.socket, and this shouldn't cause downstream test
# runs to start failing.
@pytest.mark.redistributors_should_skip
+@pytest.mark.skipif(
+ sys.version_info == (3, 14, 0, "beta", 1),
+ reason="several tools don't support 3.14.0b1",
+)
# Static analysis tools often have trouble with alpha releases, where Python's
# internals are in flux, grammar may not have settled down, etc.
@pytest.mark.skipif(
From c36b62b253de6c3f3777f0f846620a9a0e861a1c Mon Sep 17 00:00:00 2001
From: jakkdl
Date: Mon, 12 May 2025 12:50:21 +0200
Subject: [PATCH 2/7] also skip sees_all_symbols, pin cython to <3.1.0
---
src/trio/_tests/test_exports.py | 4 ++++
tox.ini | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/trio/_tests/test_exports.py b/src/trio/_tests/test_exports.py
index 61d5e944e0..5f86f40768 100644
--- a/src/trio/_tests/test_exports.py
+++ b/src/trio/_tests/test_exports.py
@@ -247,6 +247,10 @@ def no_underscores(symbols: Iterable[str]) -> set[str]:
@slow
# see comment on test_static_tool_sees_all_symbols
@pytest.mark.redistributors_should_skip
+@pytest.mark.skipif(
+ sys.version_info == (3, 14, 0, "beta", 1),
+ reason="several tools don't support 3.14.0b1",
+)
# Static analysis tools often have trouble with alpha releases, where Python's
# internals are in flux, grammar may not have settled down, etc.
@pytest.mark.skipif(
diff --git a/tox.ini b/tox.ini
index 6eecf7b78a..39d4dece5d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -52,7 +52,8 @@ commands =
[testenv:py39-cython2,py39-cython,py311-cython2,py313-cython]
description = "Run cython tests."
deps =
- cython
+ # cython 3.1.0 broke stuff https://github.com/cython/cython/issues/6865
+ cython: cython<3.1.0
cython2: cython<3
setuptools ; python_version >= '3.12'
commands_pre =
From 361fd07371a90bea3697db9012737922e87d9a40 Mon Sep 17 00:00:00 2001
From: jakkdl
Date: Mon, 12 May 2025 13:23:10 +0200
Subject: [PATCH 3/7] name 3.14 with -dev to pass if failing. Also restrict
cython version in ci
---
.github/workflows/ci.yml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 15cfcbaa64..3c6369f80d 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', '3.14']
+ python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14-dev']
arch: ['x86', 'x64']
lsp: ['']
lsp_extract_file: ['']
@@ -387,11 +387,13 @@ jobs:
- python: '3.9' # We support running on cython 2 and 3 for 3.9
cython: '<3' # cython 2
- python: '3.9'
- cython: '>=3' # cython 3 (or greater)
+ # cython 3.1.0 broke stuff https://github.com/cython/cython/issues/6865
+ cython: '>=3,<3.1' # cython 3 (or greater)
- python: '3.11' # 3.11 is the last version Cy2 supports
cython: '<3' # cython 2
- python: '3.13' # We support running cython3 on 3.13
- cython: '>=3' # cython 3 (or greater)
+ # cython 3.1.0 broke stuff https://github.com/cython/cython/issues/6865
+ cython: '>=3,<3.1' # cython 3 (or greater)
steps:
- name: Retrieve the project source from an sdist inside the GHA artifact
uses: re-actors/checkout-python-sdist@release/v2
From d9e62f14ec8712abb12d36002eac0494dddcdc8b Mon Sep 17 00:00:00 2001
From: jakkdl
Date: Mon, 12 May 2025 16:55:27 +0200
Subject: [PATCH 4/7] continue-on-error for windows3.14, add non-strict xfail
for test_error_in_run_loop, add overeager strict xfail on export tests
---
.github/workflows/ci.yml | 4 +++-
src/trio/_core/_tests/test_run.py | 5 +++++
src/trio/_tests/test_exports.py | 10 ++++++----
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3c6369f80d..e5ec45f8dc 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', '3.14-dev']
+ python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
arch: ['x86', 'x64']
lsp: ['']
lsp_extract_file: ['']
@@ -186,6 +186,8 @@ jobs:
(
endsWith(matrix.python, '-dev')
|| endsWith(matrix.python, '-nightly')
+ # 3.14+windows has very broken cffi
+ || matrix.python == '3.14'
)
&& true
|| false
diff --git a/src/trio/_core/_tests/test_run.py b/src/trio/_core/_tests/test_run.py
index c02d185d45..a8f729ec4d 100644
--- a/src/trio/_core/_tests/test_run.py
+++ b/src/trio/_core/_tests/test_run.py
@@ -923,6 +923,11 @@ async def main() -> None:
@restore_unraisablehook()
+@pytest.mark.xfail(
+ sys.version_info == (3, 14, 0, "beta", 1),
+ strict=False,
+ reason="https://github.com/python/cpython/issues/133932",
+)
def test_error_in_run_loop() -> None:
# Blow stuff up real good to check we at least get a TrioInternalError
async def main() -> None:
diff --git a/src/trio/_tests/test_exports.py b/src/trio/_tests/test_exports.py
index 5f86f40768..37d1cc3620 100644
--- a/src/trio/_tests/test_exports.py
+++ b/src/trio/_tests/test_exports.py
@@ -117,8 +117,9 @@ def iter_modules(
# won't be reflected in trio.socket, and this shouldn't cause downstream test
# runs to start failing.
@pytest.mark.redistributors_should_skip
-@pytest.mark.skipif(
- sys.version_info == (3, 14, 0, "beta", 1),
+@pytest.mark.xfail(
+ sys.version_info[:2] == (3, 14),
+ strict=True,
reason="several tools don't support 3.14.0b1",
)
# Static analysis tools often have trouble with alpha releases, where Python's
@@ -247,8 +248,9 @@ def no_underscores(symbols: Iterable[str]) -> set[str]:
@slow
# see comment on test_static_tool_sees_all_symbols
@pytest.mark.redistributors_should_skip
-@pytest.mark.skipif(
- sys.version_info == (3, 14, 0, "beta", 1),
+@pytest.mark.xfail(
+ sys.version_info[:2] == (3, 14),
+ strict=True,
reason="several tools don't support 3.14.0b1",
)
# Static analysis tools often have trouble with alpha releases, where Python's
From 768ca8574a30c4fb91f0eb255aed1dc317f46fc4 Mon Sep 17 00:00:00 2001
From: jakkdl
Date: Mon, 12 May 2025 17:05:53 +0200
Subject: [PATCH 5/7] switch back to skipif ... maybe unbreak CI?
---
.github/workflows/ci.yml | 2 +-
src/trio/_tests/test_exports.py | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e5ec45f8dc..253c90096f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -187,7 +187,7 @@ jobs:
endsWith(matrix.python, '-dev')
|| endsWith(matrix.python, '-nightly')
# 3.14+windows has very broken cffi
- || matrix.python == '3.14'
+ || endsWith(matrix.python, '3.14')
)
&& true
|| false
diff --git a/src/trio/_tests/test_exports.py b/src/trio/_tests/test_exports.py
index 37d1cc3620..736f00a94a 100644
--- a/src/trio/_tests/test_exports.py
+++ b/src/trio/_tests/test_exports.py
@@ -117,9 +117,9 @@ def iter_modules(
# won't be reflected in trio.socket, and this shouldn't cause downstream test
# runs to start failing.
@pytest.mark.redistributors_should_skip
-@pytest.mark.xfail(
- sys.version_info[:2] == (3, 14),
- strict=True,
+@pytest.mark.skipif(
+ sys.version_info == (3, 14, 0, "beta", 1),
+ # 12 pass, 16 fail
reason="several tools don't support 3.14.0b1",
)
# Static analysis tools often have trouble with alpha releases, where Python's
@@ -248,9 +248,9 @@ def no_underscores(symbols: Iterable[str]) -> set[str]:
@slow
# see comment on test_static_tool_sees_all_symbols
@pytest.mark.redistributors_should_skip
-@pytest.mark.xfail(
- sys.version_info[:2] == (3, 14),
- strict=True,
+@pytest.mark.skipif(
+ sys.version_info == (3, 14, 0, "beta", 1),
+ # 2 passes, 12 fails
reason="several tools don't support 3.14.0b1",
)
# Static analysis tools often have trouble with alpha releases, where Python's
From 20ff958e3806a790ec2acabecd784bd0c9ef2ebc Mon Sep 17 00:00:00 2001
From: jakkdl
Date: Mon, 12 May 2025 17:08:05 +0200
Subject: [PATCH 6/7] unbreak CI
---
.github/workflows/ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 253c90096f..ec7875c4ac 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -181,13 +181,13 @@ jobs:
# lsp: 'http://download.pctools.com/mirror/updates/9.0.0.2308-SDavfree-lite_en.exe'
# lsp_extract_file: ''
# extra_name: ', with non-IFS LSP'
+ # 3.14+windows has very broken cffi
continue-on-error: >-
${{
(
endsWith(matrix.python, '-dev')
|| endsWith(matrix.python, '-nightly')
- # 3.14+windows has very broken cffi
- || endsWith(matrix.python, '3.14')
+ || matrix.python == '3.14'
)
&& true
|| false
From 6ec7436bc8b3e1ab7007ed4c3edcfc29c7667761 Mon Sep 17 00:00:00 2001
From: jakkdl
Date: Wed, 14 May 2025 13:04:56 +0200
Subject: [PATCH 7/7] =?UTF-8?q?summer=20is=20finally=20here=20=E2=98=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/ci.yml | 3 ++-
src/trio/_core/_tests/test_run.py | 7 ++++---
src/trio/_tests/test_exports.py | 8 ++++----
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ec7875c4ac..562495a4a2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -181,7 +181,8 @@ jobs:
# lsp: 'http://download.pctools.com/mirror/updates/9.0.0.2308-SDavfree-lite_en.exe'
# lsp_extract_file: ''
# extra_name: ', with non-IFS LSP'
- # 3.14+windows has very broken cffi
+
+ # ***REMEMBER*** to remove the 3.14 line once windows+cffi works again
continue-on-error: >-
${{
(
diff --git a/src/trio/_core/_tests/test_run.py b/src/trio/_core/_tests/test_run.py
index a8f729ec4d..f3e53ace38 100644
--- a/src/trio/_core/_tests/test_run.py
+++ b/src/trio/_core/_tests/test_run.py
@@ -922,10 +922,11 @@ async def main() -> None:
gc_collect_harder()
+# This segfaults, so we need to skipif. Remember to remove the skipif once
+# the upstream issue is resolved.
@restore_unraisablehook()
-@pytest.mark.xfail(
- sys.version_info == (3, 14, 0, "beta", 1),
- strict=False,
+@pytest.mark.skipif(
+ sys.version_info[:3] == (3, 14, 0),
reason="https://github.com/python/cpython/issues/133932",
)
def test_error_in_run_loop() -> None:
diff --git a/src/trio/_tests/test_exports.py b/src/trio/_tests/test_exports.py
index 736f00a94a..1af78513d7 100644
--- a/src/trio/_tests/test_exports.py
+++ b/src/trio/_tests/test_exports.py
@@ -118,9 +118,9 @@ def iter_modules(
# runs to start failing.
@pytest.mark.redistributors_should_skip
@pytest.mark.skipif(
- sys.version_info == (3, 14, 0, "beta", 1),
+ sys.version_info[:4] == (3, 14, 0, "beta"),
# 12 pass, 16 fail
- reason="several tools don't support 3.14.0b1",
+ reason="several tools don't support 3.14",
)
# Static analysis tools often have trouble with alpha releases, where Python's
# internals are in flux, grammar may not have settled down, etc.
@@ -249,9 +249,9 @@ def no_underscores(symbols: Iterable[str]) -> set[str]:
# see comment on test_static_tool_sees_all_symbols
@pytest.mark.redistributors_should_skip
@pytest.mark.skipif(
- sys.version_info == (3, 14, 0, "beta", 1),
+ sys.version_info[:4] == (3, 14, 0, "beta"),
# 2 passes, 12 fails
- reason="several tools don't support 3.14.0b1",
+ reason="several tools don't support 3.14.0",
)
# Static analysis tools often have trouble with alpha releases, where Python's
# internals are in flux, grammar may not have settled down, etc.