Repository navigation
ci(python-wheels): publish free-threaded cp314t wheels and an sdist - #501
Merged
Merged
Conversation
Contributor
Author
|
I ran the changed workflow on the fork branch ( All 9 build jobs pass. The free-threaded jobs produce real I installed the CI-built macOS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The Python SDK can't be installed on free-threaded CPython. PyPI only has
cp39-abi3wheels and no sdist, and free-threaded interpreters can't load abi3 extensions:Change
Only
.github/workflows/python-wheels.ymlchanges. The abi3 wheels stay as they are.python3.14tentries for x86_64 and aarch64 (manylinux 2_28, which shipscp314-cp314t), built with--interpreter python3.14t.3.14t, and maturin gets that exact interpreter path from the step output.maturin sdist, so any interpreter without a matching wheel can still build from source.sdist.No crate or binding change is needed. Built against a free-threaded interpreter, pyo3 drops
abi3-py39and produces a version-specific extension. Since pyo3 0.28, a bare#[pymodule]declares free-threading support, so with pyo3 0.29 importing the module leaves the GIL disabled.Verification (local, macOS arm64, CPython 3.14.7t)
From the
v0.21.1tag:From the sdist (
maturin sdist). It bundlessecretspec,secretspec-ipcandsecretspec-py, then installs on 3.14t:actionlintpasses on the workflow.Not verified locally: the CI matrix itself. In particular, whether maturin finds
python3.14tby name inside the manylinux container will only show on the first run of this PR.One judgement call: the binding has not been audited for free-threading. That said,
secretspec-py/src/lib.rsholds nostatic,MutexorRefCellstate. If you'd rather opt out until an audit,#[pymodule(gil_used = true)]would keep the GIL on, and the wheels would still install.