Repository navigation
Conversation
All of the users have been migrated to `pypackaging.bzl`, so the hand written PEP 440 implementation and its tests can be removed.
Collaborator
Author
rickeylev
approved these changes
Nov 21, 2026
Bazel 8 autoloads the Python rules and providers from `rules_python` and the files that it loads for that can only load `.bzl` files from a fixed list of repositories, otherwise the build fails with `Cycle caused by autoloads`. This means that `py_library.bzl` and `py_runtime_rule.bzl` cannot use a version parser from a different repository, e.g. `pypackaging.bzl`, and they are the reason why `version.bzl` cannot be replaced with it. Neither of them needs a full PEP 440 parser: - `py_runtime` only needs the release numbers from the value of the `python_version` flag. - `py_library` only compares the versions of the same distribution for equality, so it now uses the version as it is spelled in the name of the `.dist-info` directory, which the installers already normalize. Add a test that checks that the autoloaded files only load from the repositories that Bazel allows.
…aignas.pypackaging-10-remove-version
…ctor.aignas.pypackaging-10-remove-version
…aignas.pypackaging-10-remove-version
…aignas.pypackaging-10-remove-version
…aignas.pypackaging-10-remove-version
…aignas.pypackaging-10-remove-version
…aignas.pypackaging-10-remove-version
aignas
marked this pull request as ready for review
November 22, 2026 08:41
…aignas.pypackaging-10-remove-version
|
No actionable comments were generated in the recent review. Walkthrough
Change: Refactor Merge Risk:
|
This branch has not been deployed
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.
All of the users have been migrated to
pypackaging.bzlor no longerneed to parse the versions (#4569), so the hand written PEP 440
implementation and its tests can be removed.
Summary by CodeRabbit