Skip to content

🐛 fix(pkg): distinguish free-threaded Python in wheel build env#3891

Merged
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:3314
Mar 20, 2026
Merged

🐛 fix(pkg): distinguish free-threaded Python in wheel build env#3891
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:3314

Conversation

@gaborbernat
Copy link
Copy Markdown
Member

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 #3314

@gaborbernat gaborbernat merged commit 9672736 into tox-dev:main Mar 20, 2026
50 of 51 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wheel installation failure on 3.13t

1 participant