Skip to content

[9.0.0] Upgrade rules_python to 1.7.0#27841

Merged
iancha1992 merged 2 commits intobazelbuild:release-9.0.0from
bazel-io:cp27792-9.0.0
Dec 3, 2025
Merged

[9.0.0] Upgrade rules_python to 1.7.0#27841
iancha1992 merged 2 commits intobazelbuild:release-9.0.0from
bazel-io:cp27792-9.0.0

Conversation

@bazel-io
Copy link
Member

@bazel-io bazel-io commented Dec 2, 2025

This is a fork of #27498.

From the comments/open items on that PR, I've:

  1. Removed the tests that were called out as not needed.
  2. Added manual tag to focus_test to avoid pickup in larger runs until issue with --experimental_enable_skyfocus is resolved.
  3. Switched failing test cases from using from bazel_tools.tools.python.runfiles import runfiles to use from python.runfiles import runfiles

There are still a couple failing tests, looking for some guidance on if these can be removed/ignored:

test_source_file_does_not_override_standard_library FAILED: Expected regexp 'I am lib!' not found.

and

1) explicitInitPy_CanBeSelectivelyDisabled(com.google.devtools.build.lib.bazel.rules.python.BazelPyBinaryConfiguredTargetTest)
value of      : getEmptyFilenames()
unexpected (4): pkg/_foo.venv/lib/python3.11/__init__.py, pkg/_foo.venv/__init__.py, pkg/_foo.venv/lib/python3.11/site-packages/__init__.py, pkg/_foo.venv/lib/__init__.py
---
expected      : [pkg/__init__.py]
but was       : [pkg/_foo.venv/lib/python3.11/__init__.py, pkg/_foo.venv/__init__.py, pkg/_foo.venv/lib/python3.11/site-packages/__init__.py, pkg/__init__.py, pkg/_foo.venv/lib/__init__.py]
	at com.google.devtools.build.lib.bazel.rules.python.BazelPyBinaryConfiguredTargetTest.explicitInitPy_CanBeSelectivelyDisabled(BazelPyBinaryConfiguredTargetTest.java:235)
2) explicitInitPy_CanBeGloballyDisabled(com.google.devtools.build.lib.bazel.rules.python.BazelPyBinaryConfiguredTargetTest)
value of      : getEmptyFilenames()
unexpected (4): pkg/_foo.venv/lib/python3.11/__init__.py, pkg/_foo.venv/__init__.py, pkg/_foo.venv/lib/python3.11/site-packages/__init__.py, pkg/_foo.venv/lib/__init__.py
---
expected      : [pkg/__init__.py]
but was       : [pkg/_foo.venv/lib/python3.11/__init__.py, pkg/_foo.venv/__init__.py, pkg/_foo.venv/lib/python3.11/site-packages/__init__.py, pkg/__init__.py, pkg/_foo.venv/lib/__init__.py]
	at com.google.devtools.build.lib.bazel.rules.python.BazelPyBinaryConfiguredTargetTest.explicitInitPy_CanBeGloballyDisabled(BazelPyBinaryConfiguredTargetTest.java:250)

Closes #27792.

PiperOrigin-RevId: 839448559
Change-Id: I888614dd92fcbc4deda63a86a452bbd94e8f1523

Commit fbe3009

dabanki and others added 2 commits December 2, 2025 23:27
This is a fork of bazelbuild#27498.

From the comments/open items on that PR, I've:
1. Removed the tests that were called out as not needed.
2. Added manual tag to `focus_test` to avoid pickup in larger runs until issue with `--experimental_enable_skyfocus` is resolved.
3. Switched failing test cases from using `from bazel_tools.tools.python.runfiles import runfiles` to use `from python.runfiles import runfiles`

There are still a couple failing tests, looking for some guidance on if these can be removed/ignored:
```
test_source_file_does_not_override_standard_library FAILED: Expected regexp 'I am lib!' not found.
```
and
```
1) explicitInitPy_CanBeSelectivelyDisabled(com.google.devtools.build.lib.bazel.rules.python.BazelPyBinaryConfiguredTargetTest)
value of      : getEmptyFilenames()
unexpected (4): pkg/_foo.venv/lib/python3.11/__init__.py, pkg/_foo.venv/__init__.py, pkg/_foo.venv/lib/python3.11/site-packages/__init__.py, pkg/_foo.venv/lib/__init__.py
---
expected      : [pkg/__init__.py]
but was       : [pkg/_foo.venv/lib/python3.11/__init__.py, pkg/_foo.venv/__init__.py, pkg/_foo.venv/lib/python3.11/site-packages/__init__.py, pkg/__init__.py, pkg/_foo.venv/lib/__init__.py]
	at com.google.devtools.build.lib.bazel.rules.python.BazelPyBinaryConfiguredTargetTest.explicitInitPy_CanBeSelectivelyDisabled(BazelPyBinaryConfiguredTargetTest.java:235)
2) explicitInitPy_CanBeGloballyDisabled(com.google.devtools.build.lib.bazel.rules.python.BazelPyBinaryConfiguredTargetTest)
value of      : getEmptyFilenames()
unexpected (4): pkg/_foo.venv/lib/python3.11/__init__.py, pkg/_foo.venv/__init__.py, pkg/_foo.venv/lib/python3.11/site-packages/__init__.py, pkg/_foo.venv/lib/__init__.py
---
expected      : [pkg/__init__.py]
but was       : [pkg/_foo.venv/lib/python3.11/__init__.py, pkg/_foo.venv/__init__.py, pkg/_foo.venv/lib/python3.11/site-packages/__init__.py, pkg/__init__.py, pkg/_foo.venv/lib/__init__.py]
	at com.google.devtools.build.lib.bazel.rules.python.BazelPyBinaryConfiguredTargetTest.explicitInitPy_CanBeGloballyDisabled(BazelPyBinaryConfiguredTargetTest.java:250)
```

Closes bazelbuild#27792.

PiperOrigin-RevId: 839448559
Change-Id: I888614dd92fcbc4deda63a86a452bbd94e8f1523
@bazel-io bazel-io requested a review from a team as a code owner December 2, 2025 23:47
@bazel-io bazel-io added team-Configurability platforms, toolchains, cquery, select(), config transitions team-Rules-Python Native rules for Python awaiting-review PR is awaiting review from an assigned reviewer labels Dec 2, 2025
@bazel-io bazel-io requested a review from gregestren December 2, 2025 23:47
@gregestren gregestren added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Dec 3, 2025
@iancha1992 iancha1992 added this pull request to the merge queue Dec 3, 2025
@iancha1992 iancha1992 removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Dec 3, 2025
Merged via the queue into bazelbuild:release-9.0.0 with commit 04d1107 Dec 3, 2025
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Configurability platforms, toolchains, cquery, select(), config transitions team-Rules-Python Native rules for Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants