Draft - Build and publish free-threaded Python wheels (cp313t/cp314t) across CI #1355
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
Python’s experimental free-threaded builds (currently 3.13t and 3.14t) use a different ABI than the standard GIL-enabled CPython builds. Because of that, we can’t rely on a single stable-ABI (
abi3) wheel to cover these interpreters.At the same time, we still want to keep the existing
abi3-py310configuration so we continue producing stable-ABI wheels for the “normal” (GIL-enabled) CPython versions.This PR updates the release/build pipeline so we can ship:
abi3-py310), andWhat changes are included in this PR?
Expanded CI build matrix for macOS + Windows to build wheels for:
Artifact naming improvements using a suffix (e.g.
-freethreaded) to avoid collisions and make uploads easier to identify.maturin invocation updated on macOS/Windows to explicitly target the active interpreter (
--interpreter python).Manylinux builds split into two groups:
using
maturin-action’sinterpreterparameter.Cargo / PyO3 config adjustment: removed the generic
abi3feature while keepingabi3-py310enabled, aligning with the intended wheel strategy.Release documentation updated to clarify that free-threaded CPython ignores
abi3and requires per-version wheels.Are these changes tested?
CI was updated to build wheels across the expanded interpreter matrix on:
These builds act as the primary validation for this change (successful wheel builds + artifact upload for each target).
Are there any user-facing changes?
Yes — users will now see additional wheel files published for free-threaded Python:
cp313tandcp314twheels (per-ABI/per-version)Standard CPython users (3.10–3.14) continue to get stable-ABI (
abi3) wheels as before.No runtime API changes are introduced by this PR.
LLM-generated code disclosure
This PR includes code, comments generated with assistance from LLM. All LLM-generated content has been manually reviewed and tested.