🐛 fix(pkg): distinguish free-threaded Python in wheel build env#3891
Merged
gaborbernat merged 1 commit intotox-dev:mainfrom Mar 20, 2026
Merged
🐛 fix(pkg): distinguish free-threaded Python in wheel build env#3891gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat merged 1 commit intotox-dev:mainfrom
Conversation
gaborbernat
added a commit
to gaborbernat/tox
that referenced
this pull request
Mar 30, 2026
…dev#3891) Running `tox -e py314t` builds the wheel in a `.pkg` environment that may use non-free-threaded Python. The `default_wheel_tag` function only compared `version_no_dot` and `impl_lower` between the package env and target env. Since `version_no_dot` is `"314"` for both `py314` and `py314t`, they shared the same `.pkg` environment, producing wheels with `cp314` tags instead of `cp314t`. 🐛 `pip install` in the free-threaded target env then rejects the wheel as unsupported. The fix adds `free_threaded` to the compatibility check in `default_wheel_tag()` and appends the `t` suffix to the generated environment name when the target interpreter is free-threaded (e.g., `.pkg-cpython314t`). This ensures each threading variant gets its own build environment with matching wheel tags. Fixes tox-dev#3314 --------- Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.
Running
tox -e py314tbuilds the wheel in a.pkgenvironment that may use non-free-threaded Python. Thedefault_wheel_tagfunction only comparedversion_no_dotandimpl_lowerbetween the package env and target env. Sinceversion_no_dotis"314"for bothpy314andpy314t, they shared the same.pkgenvironment, producing wheels withcp314tags instead ofcp314t. 🐛pip installin the free-threaded target env then rejects the wheel as unsupported.The fix adds
free_threadedto the compatibility check indefault_wheel_tag()and appends thetsuffix to the generated environment name when the target interpreter is free-threaded (e.g.,.pkg-cpython314t). This ensures each threading variant gets its own build environment with matching wheel tags.Fixes #3314