Skip to content

Commit 5d0cae5

Browse files
authored
ci: stop testing 3.13t (#5865)
* ci: stop testing 3.13t * forbid building with 3.13t * newsfragment
1 parent 300d857 commit 5d0cae5

4 files changed

Lines changed: 23 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ jobs:
233233
"3.11",
234234
"3.12",
235235
"3.13",
236-
"3.13t",
237236
"3.14",
238237
"3.14t",
239238
"3.15-dev",

newsfragments/5865.packaging.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Drop support for Python 3.13t (3.14t and above continue to be supported in alignment with CPython declaring free-threading supported starting with Python 3.14).

noxfile.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def _supported_interpreter_versions(
7777
versions = [f"{major}.{minor}" for minor in range(min_minor, max_minor + 1)]
7878
# Add free-threaded builds for 3.13+
7979
if python_impl == "cpython":
80-
versions += [f"{major}.{minor}t" for minor in range(13, max_minor + 1)]
80+
versions += [f"{major}.{minor}t" for minor in range(14, max_minor + 1)]
8181
return versions
8282

8383

@@ -992,6 +992,14 @@ def test_version_limits(session: nox.Session):
992992
config_file.set("PyPy", "3.10")
993993
_run_cargo(session, "check", env=env, expect_error=True)
994994

995+
# 3.13t is no longer supported
996+
config_file.set("CPython", "3.13t")
997+
_run_cargo(session, "check", env=env, expect_error=True)
998+
999+
# 3.14t is PyO3's minimum version of free-threaded Python
1000+
config_file.set("CPython", "3.14t")
1001+
_run_cargo(session, "check", env=env)
1002+
9951003
# attempt to build with latest version and check that abi3 version
9961004
# configured matches the feature
9971005
max_minor_version = max(int(v.split(".")[1]) for v in ABI3_PY_VERSIONS)

pyo3-ffi/build.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,19 @@ fn ensure_python_version(interpreter_config: &InterpreterConfig) -> Result<()> {
8080
return Err(error.finish().into());
8181
}
8282
}
83+
84+
if interpreter_config.is_free_threaded() {
85+
let min_free_threaded_version = PythonVersion {
86+
major: 3,
87+
minor: 14,
88+
};
89+
ensure!(
90+
interpreter_config.version >= min_free_threaded_version,
91+
"PyO3 does not support the free-threaded build of CPython versions below {}, the selected Python version is {}",
92+
min_free_threaded_version,
93+
interpreter_config.version,
94+
);
95+
}
8396
}
8497
PythonImplementation::PyPy => {
8598
let versions = SUPPORTED_VERSIONS_PYPY;

0 commit comments

Comments
 (0)