Skip to content

Commit 0e4830a

Browse files
authored
Merge branch 'main' into fix-ln-race-condition-20260527
2 parents d00a34f + a9de4d5 commit 0e4830a

95 files changed

Lines changed: 590 additions & 410 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/buildkite-get-results/scripts/get_buildkite_results.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ def fetch_buildkite_data(build_url):
8585
elif isinstance(jobs_data, dict) and "records" in jobs_data:
8686
data["jobs"] = jobs_data["records"]
8787
except Exception as e:
88-
print(f"Warning: Could not fetch detailed jobs from {jobs_url}: {e}", file=sys.stderr)
88+
print(
89+
f"Warning: Could not fetch detailed jobs from {jobs_url}: {e}",
90+
file=sys.stderr,
91+
)
8992

9093
return data
9194

@@ -165,15 +168,18 @@ def main():
165168

166169
build_state = data.get("state", "Unknown")
167170
print(f"Build State: {build_state}")
168-
171+
169172
jobs = data.get("jobs", [])
170173
jobs_count = data.get("statistics", {}).get("jobs_count", 0)
171-
174+
172175
print(f"Total jobs reported: {jobs_count}")
173176
print(f"Jobs found in data: {len(jobs)}")
174-
177+
175178
if jobs_count != len(jobs):
176-
print(f"WARNING: Reported job count ({jobs_count}) does not match jobs found ({len(jobs)}).", file=sys.stderr)
179+
print(
180+
f"WARNING: Reported job count ({jobs_count}) does not match jobs found ({len(jobs)}).",
181+
file=sys.stderr,
182+
)
177183

178184
print("-" * 40)
179185

.bazelci/presubmit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ tasks:
296296
<<: *minimum_supported_version
297297
<<: *reusable_config
298298
name: "RBE: Ubuntu, minimum Bazel"
299-
platform: rbe_ubuntu2204
299+
platform: rbe_ubuntu2404
300300
build_flags:
301301
- "--experimental_repository_cache_hardlinks=false"
302302
# BazelCI sets --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1,
@@ -315,7 +315,7 @@ tasks:
315315
rbe:
316316
<<: *reusable_config
317317
name: "RBE: Ubuntu"
318-
platform: rbe_ubuntu2204
318+
platform: rbe_ubuntu2404
319319
# TODO @aignas 2024-12-11: get the RBE working in CI for bazel 8.0
320320
# See https://github.com/bazelbuild/rules_python/issues/2499
321321
bazel: 8.x

.github/workflows/ci.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types:
9+
- opened
10+
- synchronize
11+
12+
defaults:
13+
run:
14+
shell: bash
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
mypy:
21+
runs-on: ubuntu-latest
22+
steps:
23+
# Checkout the code
24+
- uses: actions/checkout@v6
25+
- uses: jpetrucciani/mypy-check@master
26+
with:
27+
path: 'python/runfiles'
28+
- uses: jpetrucciani/mypy-check@master
29+
with:
30+
path: 'tests/runfiles'
31+
ruff:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v6
35+
- uses: astral-sh/ruff-action@v4.0.0
36+
with:
37+
# Keep in sync with .pre-commit-config.yaml
38+
version: 0.15.14
39+
args: check --extend-exclude testdata
40+
- uses: astral-sh/ruff-action@v4.0.0
41+
with:
42+
version: 0.15.14
43+
args: format --check --exclude testdata

.github/workflows/mypy.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,15 @@ repos:
2929
- --warnings=all
3030
- id: buildifier-lint
3131
args: *args
32-
- repo: https://github.com/pycqa/isort
33-
rev: 5.12.0
32+
- repo: https://github.com/astral-sh/ruff-pre-commit
33+
# Keep in sync with .github/workflows/ruff.yaml
34+
rev: v0.15.14
3435
hooks:
35-
- id: isort
36-
name: isort (python)
37-
args:
38-
- --profile
39-
- black
40-
- repo: https://github.com/psf/black
41-
rev: 25.1.0
42-
hooks:
43-
- id: black
36+
- id: ruff-check
37+
args: [--fix]
38+
exclude: testdata
39+
- id: ruff-format
40+
exclude: testdata
4441
- repo: local
4542
hooks:
4643
- id: update-deleted-packages

CHANGELOG.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ END_UNRELEASED_TEMPLATE
6565
default to `true`.
6666
* (pypi) The data files of a wheel (bin, includes, etc) are now always included
6767
as a library's data dependencies.
68+
* (coverage) When `configure_coverage_tool = True` is set but the bundled
69+
`coverage.py` wheel set has no entry for the requested python version and
70+
platform, a warning is now printed instead of silently producing an empty
71+
coverage report.
6872

6973
{#v0-0-0-fixed}
7074
### Fixed
@@ -82,7 +86,16 @@ END_UNRELEASED_TEMPLATE
8286
* (pypi) Fix `importlib.metadata.files` by ensuring `RECORD` is included in
8387
installed wheel targets, except when built from sdist
8488
([#3024](https://github.com/bazel-contrib/rules_python/issues/3024)).
85-
89+
* (system_python) Fix AttributeError exception on Debian 10 Buster
90+
python installations which may not set `sys._base_executable`
91+
([#3774](https://github.com/bazel-contrib/rules_python/issues/3774)).
92+
* (windows) Fix `py_test`/`py_binary` failure when the target name contains
93+
path separators; the bootstrap stub is now declared as a sibling of the
94+
`.exe` launcher
95+
([#3789](https://github.com/bazel-contrib/rules_python/issues/3789)).
96+
* Fix the forwarding of `target_compatible_with` from `compile_pip_requirements`
97+
towards the underlying `*.update` target.
98+
([#3787](https://github.com/bazel-contrib/rules_python/pull/3787))
8699

87100
{#v0-0-0-added}
88101
### Added
@@ -96,13 +109,21 @@ END_UNRELEASED_TEMPLATE
96109
Fixes [#3296](https://github.com/bazel-contrib/rules_python/issues/3296).
97110
* (gazelle) Support alias_kind directive.
98111
Fixes [#3183](https://github.com/bazel-contrib/rules_python/issues/3183).
99-
* (toolchains) `3.13.12`, `3.14.3` Python toolchain from [20260325] release.
100-
* (toolchains) `3.10.20`, `3.11.15`, `3.12.13`, `3.13.13` `3.14.4`, `3.15.0a8`
101-
* Python toolchain from [20260414] release.
102112
* (pypi) `package_metadata` support, fixes
103113
[#2054](https://github.com/bazel-contrib/rules_python/issues/2054).
104114
* (coverage) Add support for python 3.14 and bump `coverage.py` to 7.10.7.
105115

116+
{#v2-0-2}
117+
## [2.0.2] - 2026-05-14
118+
119+
[2.0.2]: https://github.com/bazel-contrib/rules_python/releases/tag/2.0.2
120+
121+
{#v2-0-2-added}
122+
### Added
123+
* (toolchains) `3.13.12`, `3.14.3` Python toolchain from [20260325] release.
124+
* (toolchains) `3.10.20`, `3.11.15`, `3.12.13`, `3.13.13` `3.14.4`, `3.15.0a8`
125+
* Python toolchain from [20260414] release.
126+
106127
[20260325]: https://github.com/astral-sh/python-build-standalone/releases/tag/20260325
107128
[20260414]: https://github.com/astral-sh/python-build-standalone/releases/tag/20260414
108129

@@ -232,6 +253,17 @@ Other changes:
232253
* (wheel) Add support for `add_path_prefix` argument in `py_wheel` which can be
233254
used to prepend a prefix to the files in the wheel.
234255

256+
{#v1-9-1}
257+
## [1.9.1] - 2026-05-14
258+
259+
[1.9.1]: https://github.com/bazel-contrib/rules_python/releases/tag/1.9.1
260+
261+
{#v1-9-1-added}
262+
### Added
263+
* (toolchains) `3.13.12`, `3.14.3` Python toolchain from [20260325] release.
264+
* (toolchains) `3.10.20`, `3.11.15`, `3.12.13`, `3.13.13` `3.14.4`, `3.15.0a8`
265+
* Python toolchain from [20260414] release.
266+
235267
{#v1-9-0}
236268
## [1.9.0] - 2026-02-21
237269

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ bazel_dep(name = "bazel_features", version = "1.21.0")
88
bazel_dep(name = "bazel_skylib", version = "1.8.2")
99
bazel_dep(name = "package_metadata", version = "0.0.7")
1010
bazel_dep(name = "platforms", version = "0.0.11")
11-
bazel_dep(name = "rules_cc", version = "0.1.5")
11+
bazel_dep(name = "rules_cc", version = "0.2.17")
1212

1313
# Those are loaded only when using py_proto_library
1414
# Use py_proto_library directly from protobuf repository

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@
133133
# --- Extlinks configuration
134134
extlinks = {
135135
"gh-issue": (
136-
f"https://github.com/bazel-contrib/rules_python/issues/%s",
136+
"https://github.com/bazel-contrib/rules_python/issues/%s",
137137
"#%s issue",
138138
),
139-
"gh-path": (f"https://github.com/bazel-contrib/rules_python/tree/main/%s", "%s"),
140-
"gh-pr": (f"https://github.com/bazel-contrib/rules_python/pull/%s", "#%s PR"),
139+
"gh-path": ("https://github.com/bazel-contrib/rules_python/tree/main/%s", "%s"),
140+
"gh-pr": ("https://github.com/bazel-contrib/rules_python/pull/%s", "#%s PR"),
141141
}
142142

143143
# --- MyST configuration

examples/bzlmod/entry_points/tests/pylint_deps_test.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import os
1616
import pathlib
1717
import subprocess
18-
import tempfile
1918
import unittest
2019

2120
from python.runfiles import runfiles
@@ -29,9 +28,9 @@ def __init__(self, *args, **kwargs):
2928

3029
def test_pylint_entry_point(self):
3130
rlocation_path = os.environ.get("ENTRY_POINT")
32-
assert (
33-
rlocation_path is not None
34-
), "expected 'ENTRY_POINT' env variable to be set to rlocation of the tool"
31+
assert rlocation_path is not None, (
32+
"expected 'ENTRY_POINT' env variable to be set to rlocation of the tool"
33+
)
3534

3635
entry_point = pathlib.Path(runfiles.Create().Rlocation(rlocation_path))
3736
self.assertTrue(entry_point.exists(), f"'{entry_point}' does not exist")
@@ -51,20 +50,20 @@ def test_pylint_entry_point(self):
5150
"",
5251
proc.stderr.decode("utf-8").strip(),
5352
)
54-
self.assertRegex(proc.stdout.decode("utf-8").strip(), "^pylint 2\.15\.9")
53+
self.assertRegex(proc.stdout.decode("utf-8").strip(), r"^pylint 2\.15\.9")
5554

5655
def test_pylint_report_has_expected_warnings(self):
5756
rlocation_path = os.environ.get("PYLINT_REPORT")
58-
assert (
59-
rlocation_path is not None
60-
), "expected 'PYLINT_REPORT' env variable to be set to rlocation of the report"
57+
assert rlocation_path is not None, (
58+
"expected 'PYLINT_REPORT' env variable to be set to rlocation of the report"
59+
)
6160

6261
pylint_report = pathlib.Path(runfiles.Create().Rlocation(rlocation_path))
6362
self.assertTrue(pylint_report.exists(), f"'{pylint_report}' does not exist")
6463

6564
self.assertRegex(
6665
pylint_report.read_text().strip(),
67-
"W8201: Logging should be used instead of the print\(\) function\. \(print-function\)",
66+
r"W8201: Logging should be used instead of the print\(\) function\. \(print-function\)",
6867
)
6968

7069

examples/bzlmod/entry_points/tests/pylint_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def __init__(self, *args, **kwargs):
2828

2929
def test_pylint_entry_point(self):
3030
rlocation_path = os.environ.get("ENTRY_POINT")
31-
assert (
32-
rlocation_path is not None
33-
), "expected 'ENTRY_POINT' env variable to be set to rlocation of the tool"
31+
assert rlocation_path is not None, (
32+
"expected 'ENTRY_POINT' env variable to be set to rlocation of the tool"
33+
)
3434

3535
entry_point = pathlib.Path(runfiles.Create().Rlocation(rlocation_path))
3636
self.assertTrue(entry_point.exists(), f"'{entry_point}' does not exist")
@@ -50,7 +50,7 @@ def test_pylint_entry_point(self):
5050
"",
5151
proc.stderr.decode("utf-8").strip(),
5252
)
53-
self.assertRegex(proc.stdout.decode("utf-8").strip(), "^pylint 2\.15\.9")
53+
self.assertRegex(proc.stdout.decode("utf-8").strip(), r"^pylint 2\.15\.9")
5454

5555

5656
if __name__ == "__main__":

0 commit comments

Comments
 (0)