fix(pypi): include none and any tags in wheel selection and fix prerelease platform parsing - #4120
Draft
rickeylev wants to merge 4 commits into
Draft
fix(pypi): include none and any tags in wheel selection and fix prerelease platform parsing#4120rickeylev wants to merge 4 commits into
rickeylev wants to merge 4 commits into
Conversation
…form parsing Add tests reproducing wheel resolution tag handling in default_platforms and hub_builder, along with prerelease Python version platform prefixing and exact platform matching in requirements_files_by_platform.
…lease platform parsing Ensure pure-Python wheels can match target platforms by including 'none' in default ABI tags and guaranteeing 'none' and 'any' tags in hub builder platform descriptors. Fix prerelease Python version string parsing in requirements_files_by_platform to properly format platform keys.
Wrap docstrings and expressions to conform to the 80 column line limit across pypi Starlark files and analysis tests.
Rename news/whl_abi_tags.fixed.md to news/4120.fixed.md to align with the created draft PR number.
aignas
reviewed
Aug 29, 2026
Collaborator
There was a problem hiding this comment.
This is a confusing PR, the select_whl should do none-any wheel selection by default. There should be no need to change all of this. I think the best way would be to change only that part.
EDIT: https://github.com/bazel-contrib/rules_python/blob/main/python/private/pypi/platform.bzl#L31
This is the code that I had in mind writing the comment, it is not the select_whl but the platform construction code. That part will add none and any if they are not present. So I am curious what is happening here.
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.
Pure-Python wheels with the
noneABI tag andanyplatform tag failto match target platform configurations when explicit platform tags
omit them. In addition, prerelease Python version strings (such as
3.13.0rc1) cause improper platform key formatting in
requirements_files_by_platform.To resolve these issues:
noneABI tags and ensureanyplatform tags are present inplatform descriptors within hub builder and extension defaults.
version.parseinrequirements_files_by_platformto formatprerelease Python version platform prefixes correctly.
requirements_files_by_platform.