bazel: upgrade rules_python to 2.3.2 and enforce explicit init py - #11266
Open
openroad-ci wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request upgrades rules_python to version 2.3.2 and configures explicit __init__.py behavior using the --incompatible_default_to_explicit_init_py flag and the rules_python config extension. The reviewer suggested also configuring the rules_python config extension in the downstream test workspace to maintain parity and prevent potential build failures.
Upgrade rules_python from 1.8.5 to 2.3.2. Key improvements and rationale: 1. Fix upstream unhashed pip warnings: Upstream lockfile hash-pinning (grpc/grpc#42415, resolved via grpc/grpc#42637) combined with rules_python 2.x eliminates all transitive 'requirement file has been generated without hashes' warnings. We can now safely drop the previous 'quiet = True' suppression. 2. Explicit __init__.py generation: Configured explicit_init_py(default = True) and --incompatible_default_to_explicit_init_py in .bazelrc, eliminating deprecated implicit __init__.py creation warnings across the workspace and external modules. 3. Security & Hermeticity: Deterministic SHA-256 integrity verification across all wheels without host Python interpreter fallback paths. 4. Caching: Preserves deterministic action graph hashing for clean remote cache hits. 5. Downstream: Updated test/downstream/MODULE.bazel to maintain parity. Signed-off-by: Joao Luis Sombrio <sombrio@sombrasoft.dev>
openroad-ci
force-pushed
the
bazel/upgrade-rules-python-2-3-2
branch
from
August 30, 2026 09:56
ae84478 to
16cfaeb
Compare
sombraSoft
marked this pull request as ready for review
August 30, 2026 09:56
Contributor
|
FYI @oharboe |
Contributor
|
Another small win for our build's hermeticity 🚀 |
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.
Summary
Upgrades
@rules_pythonfrom1.8.5to2.3.2, removes the previousquiet = Truewarning suppression, and configures explicit__init__.pygeneration for Bazel 9 hermeticity.Motivation & Background
Fix Upstream Unhashed Pip Warnings & Remove
quiet = True:@grpc) previously triggered repetitive warnings (WARNING: requirement file has been generated without hashes...) during bzlmod evaluation. This was previously silenced viaquiet = Truein PR bazel: silence pip warnings #11143 (f166b4132a).rules_python2.x completely eliminates these unhashed warnings at the source.quiet = Truefrompip.parse.Explicit
__init__.pyCreation:__init__.pycreation.rules_python_config.explicit_init_py(default = True)inMODULE.bazeland--incompatible_default_to_explicit_init_pyin.bazelrc, ensuring zero deprecation noise across both local and transitive external targets (such assv-lang).Security & Hermeticity:
Remote Caching:
Downstream Test Parity:
test/downstream/MODULE.bazelto match therules_pythonversion bump.Verification
Validated locally using
./etc/bazel-hermetic://bazel:requirements.test(PASSED)//docs:sphinx_build_test(PASSED)//bazel:tclint(PASSED)//bazel:yamlfix(PASSED)//:openroad_py(PASSED)//test:openroad_public_test(PASSED)//test:openroad_py_public_test(PASSED)//test:openroad_lib_restricted_test(PASSED)//test:rules_verilator_dev_dep_test(PASSED)//docs/src/scripts:test_extract_utils(PASSED)