Repository navigation
feat: make Python version project scoping opt-in - #4377
Open
Spikhalskiy wants to merge 6 commits into
Open
Spikhalskiy wants to merge 6 commits into
Spikhalskiy wants to merge 6 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Author
|
I used an AI coding agent for the implementation and local review, with semi-autonomous execution under my design and scope direction. I will review and approve any AI-assisted responses before they are posted; there is no automatic review-reply bot. |
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.
Python version transitions also reach native dependencies that don't use Python, so a C++ or Rust library under bindings for several Python versions is configured once per version. Add a root-module
config.python_version_scope(scope = "project")tag that gives//python/config_settings:python_versionBazel's project scope. Ownership is delegated to the consumer's//:PROJECT.sclthrough anactualalias, so targets outside it see the command-line version and share one configuration. Universal scope stays the default, and tags from dependency modules are ignored.Project scope requires Bazel 9.2 or later, the first release that keeps project-scoped flags across exec transitions (bazelbuild/bazel#28320). Owned exec tools such as the precompiler keep the selected version, which preserves the requirement behind #4335. Older Bazel versions fail with an explicit error.
aspect_rules_py terminals set this flag as well as their own; the matching opt-in there is aspect-build/rules_py#1650.
An integration test covers target and exec propagation, convergence of the native dependency's configuration, the unchanged default, and ignored dependency-module tags.
Fixes #4375