Skip to content

feat(pypi): select abi3t wheels on free-threaded platforms - #4496

Merged
aignas merged 5 commits into
bazel-contrib:mainfrom
aignas:feat.aignas.abi3t-whl-selection
Nov 15, 2026
Merged

aignas merged 5 commits into
bazel-contrib:mainfrom
aignas:feat.aignas.abi3t-whl-selection

Conversation

@aignas

@aignas aignas commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

The free-threaded builds could not select the wheels that use the stable ABI
for the free-threaded builds (abi3t) as specified in
PEP 803.

With this change the default _freethreaded platforms use the
["abi3t", "cp{major}{minor}t"] ABI tags, so cp3xt wheels are still
preferred over abi3t wheels, in the same way as cp3x wheels are preferred
over abi3 wheels. The python tag of an abi3t wheel is the minimum
supported version, e.g. cp315-abi3t is selected for Python 3.15 and above,
and the GIL-enabled builds only select such wheels if they are also tagged as
abi3 (e.g. cp315-abi3.abi3t). abi3t is also treated as a stable ABI tag
when deriving the target platforms from the wheel tags.

@aignas
aignas requested a review from rickeylev as a code owner November 13, 2026 14:40
@aignas

aignas commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

This PR was written by an AI coding agent (Claude Code) working under the direction of @aignas, who reviewed the design and the changes. Review comments will be handled by @aignas, possibly with the help of the agent; any agent-drafted replies or follow-up commits are reviewed by @aignas before being posted. An agent monitors CI only to retry flaky network failures.

This comment was generated by an AI agent and reviewed by the user.

@rickeylev rickeylev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

(unreviewed) bot comments incoming

Comment thread python/private/pypi/extension.bzl Resolved
PEP 803 wheels compatible with both GIL-enabled and free-threaded stable
ABIs use the compressed `abi3.abi3t` tag, which `whl_target_platforms`
previously treated as a single interpreter ABI instead of `None`.

Split `abi_tag` on dots when checking for stable ABI tags, reuse
`default_platforms()` in test helpers instead of duplicating inline ABI
ternaries, and align line wrapping and constant ordering with style
conventions.

@aignas aignas left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the extra fixes!

@aignas
aignas added this pull request to the merge queue Nov 15, 2026
Merged via the queue into bazel-contrib:main with commit 28c7b4f Nov 15, 2026
1 of 2 checks passed
@aignas
aignas deleted the feat.aignas.abi3t-whl-selection branch November 15, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants