You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the direct usage of the rules_pythonPyInfo and create our own provider. Merge PyVirtualInfo into PyInfo
Changes are visible to end-users: yes
Searched for relevant documentation and updated as needed: yes
Breaking change (forces users to change their own code or config): yes
Suggested release notes appear below: yes
Outputs of aspect_rules_py may no longer be consumed by rules_python. All public entries into aspect_rules_pi such as deps of any field still support outputs of rules_python (including outputs of protobuf which outputs rules_python specific providers).
Measured with hyperfine --warmup 5 --runs 50 on Linux Gate: PR vs HEAD main (threshold: 10%). BCR is shown only as a historical baseline. Build time: cold bazel build //:bench with isolated output base, no disk cache.
sys.path quality
Version
sys.path entries
distinct site-packages roots
duplicate realpaths
BCR 1.11.7 (baseline)
6
1
0
HEAD main
7
2
0
This PR
7
2
0
sys.path quality measured by bench_syspath inside the assembled venv. Duplicate realpaths indicate symlink redundancy; many distinct site-packages roots suggest an inefficient venv layout.
✅ No regression detected (PR is +1.7% vs HEAD main)
Measured with hyperfine --warmup 5 --runs 50 on Linux Gate: PR vs HEAD main (threshold: 10%). BCR is shown only as a historical baseline. Build time: cold bazel build //:bench with isolated output base, no disk cache.
sys.path quality
Version
sys.path entries
distinct site-packages roots
duplicate realpaths
BCR 1.11.7 (baseline)
6
1
0
HEAD main
7
2
0
This PR
7
2
0
sys.path quality measured by bench_syspath inside the assembled venv. Duplicate realpaths indicate symlink redundancy; many distinct site-packages roots suggest an inefficient venv layout.
Bazel analysis benchmark
Version
Mean (ms)
Median (ms)
± stddev
vs BCR
vs main
Packages
Targets
BCR 2.0.0-alpha.4 (baseline)
10831.563
10826.979
±137.225
—
—
101
301
HEAD main
10004.231
9987.487
±122.446
-7.6%
—
101
301
This PR
10063.422
10046.343
±98.476
-7.1%
+0.6%
101
301
Measured with hyperfine --warmup 1 --runs 10 on Linux Gate: PR vs HEAD main (threshold: 10%). BCR is shown only as a historical baseline. Command: cold bazel build --nobuild //workspace/... with isolated output base, no disk cache.
Auxiliary metrics
Version
Loaded packages
Configured targets
BCR 2.0.0-alpha.4 (baseline)
101
301
HEAD main
101
301
This PR
101
301
jbedard
changed the title
WIP: use own providers
refactor: use simplified rules_py providers
Jul 9, 2026
Drive-by feedback from moving a codebase fully onto python_interpreters (as the rules_python python.toolchain() drop-in), relevant to this detachment work: version selection still requires @rules_python to be visible.
With the direct rules_python dep dropped, setting the interpreter fails, because the flag lives in rules_python:
ERROR: @rules_python//python/config_settings:python_version :: Error loading option
@rules_python//python/config_settings:python_version: No repository visible as
'@rules_python' from main repository
rules_py's own e2e selects the version the same way (--@rules_python//python/config_settings:python_version=…), so there doesn't appear to be a rules_py-native equivalent. Net effect: a consumer that "fully" moves to python_interpreters still has to keep a direct bazel_dep(rules_python) purely to pick a Python version. If the goal is for the detachment to go unnoticed by such consumers, python_interpreters probably wants to re-export (or provide its own) version-selection flag. Not blocking anything for us — just flagging while the surface is in flux.
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
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.
Remove the direct usage of the
rules_pythonPyInfoand create our own provider. MergePyVirtualInfointoPyInfoChanges are visible to end-users: yes
Outputs of
aspect_rules_pymay no longer be consumed byrules_python. All public entries intoaspect_rules_pisuch asdepsof any field still support outputs ofrules_python(including outputs ofprotobufwhich outputsrules_pythonspecific providers).Test plan