Skip to content

Commit 1de91b1

Browse files
committed
Merge branch 'main' of https://github.com/bazel-contrib/rules_python into pr-3381
2 parents cf4ddb9 + c037d83 commit 1de91b1

25 files changed

Lines changed: 295 additions & 348 deletions

File tree

.bazelci/presubmit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
buildifier:
1717
# keep these arguments in sync with .pre-commit-config.yaml
1818
# Use a specific version to avoid skew issues when new versions are released.
19-
version: 6.1.0
19+
version: 8.2.1
2020
warnings: "all"
2121
# NOTE: Minimum supported version is 7.x
2222
.minimum_supported_version: &minimum_supported_version

.bcr/gazelle/presubmit.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ bcr_test_module:
1616
module_path: "examples/bzlmod_build_file_generation"
1717
matrix:
1818
platform: ["debian11", "macos", "ubuntu2004", "windows"]
19-
# last_rc is to get latest 8.x release. Replace with 8.x when available.
20-
bazel: [7.x, last_rc]
19+
bazel: [7.x, 8.x]
2120
tasks:
2221
run_tests:
2322
name: "Run test module"
2423
platform: ${{ platform }}
2524
bazel: ${{ bazel }}
2625
shell_commands:
2726
- "echo 'common --override_module=rules_python=' >> .bazelrc"
27+
batch_commands:
28+
- "echo common --override_module=rules_python= >> .bazelrc"
2829
build_targets:
2930
- "//..."
3031
- ":modules_map"

.bcr/presubmit.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ bcr_test_module:
1616
module_path: "examples/bzlmod"
1717
matrix:
1818
platform: ["debian11", "macos", "ubuntu2004", "windows"]
19-
# last_rc is to get latest 8.x release. Replace with 8.x when available.
20-
bazel: [7.x, last_rc]
19+
bazel: [7.x, 8.x]
2120
tasks:
2221
run_tests:
2322
name: "Run test module"

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
hooks:
2222
- id: check-merge-conflict
2323
- repo: https://github.com/keith/pre-commit-buildifier
24-
rev: 6.1.0
24+
rev: 8.2.1
2525
hooks:
2626
- id: buildifier
2727
args: &args

CHANGELOG.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,55 @@ BEGIN_UNRELEASED_TEMPLATE
3030
3131
{#v0-0-0-removed}
3232
### Removed
33-
3433
* Nothing removed.
34+
3535
{#v0-0-0-changed}
3636
### Changed
3737
* Nothing changed.
3838
3939
{#v0-0-0-fixed}
4040
### Fixed
41-
* (gazelle) Remove {obj}`py_binary` targets with invalid `srcs`. This includes files
42-
that are not generated or regular files.
41+
* Nothing fixed.
4342
4443
{#v0-0-0-added}
4544
### Added
4645
* Nothing added.
4746
48-
4947
END_UNRELEASED_TEMPLATE
5048
-->
5149

50+
51+
{#v0-0-0}
52+
## Unreleased
53+
54+
[0.0.0]: https://github.com/bazel-contrib/rules_python/releases/tag/0.0.0
55+
56+
{#v0-0-0-removed}
57+
### Removed
58+
* (toolchain) Remove all of the python 3.9 toolchain versions except for the `3.9.25`.
59+
This version has reached EOL and will no longer receive any security fixes, please update to
60+
`3.10` or above.
61+
62+
{#v0-0-0-changed}
63+
### Changed
64+
* (toolchains) Use toolchains from the [20251031] release.
65+
66+
{#v0-0-0-fixed}
67+
### Fixed
68+
* (gazelle) Remove {obj}`py_binary` targets with invalid `srcs`. This includes files
69+
that are not generated or regular files.
70+
* (runfiles) Fix incorrect Python runfiles path assumption - the existing
71+
implementation assumes that it is always four levels below the runfiles
72+
directory, leading to incorrect path checks
73+
([#3085](https://github.com/bazel-contrib/rules_python/issues/3085)).
74+
* (toolchains) local toolchains now tell the `sys.abiflags` value of the
75+
underlying runtime.
76+
77+
{#v0-0-0-added}
78+
### Added
79+
* (toolchains) `3.9.25` Python toolchain from [20251031] release.
80+
81+
[20251031]: https://github.com/astral-sh/python-build-standalone/releases/tag/20251031
5282
{#v1-7-0}
5383
## [1.7.0] - 2025-10-11
5484

MODULE.bazel

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,7 @@ bazel_binaries.local(
359359
)
360360
bazel_binaries.download(version = "7.4.1")
361361
bazel_binaries.download(version = "8.0.0")
362-
363-
# For now, don't test with rolling, because that's Bazel 9, which is a ways
364-
# away.
365-
# bazel_binaries.download(version = "rolling")
362+
bazel_binaries.download(version = "9.0.0rc1")
366363
use_repo(
367364
bazel_binaries,
368365
"bazel_binaries",
@@ -371,6 +368,7 @@ use_repo(
371368
"bazel_binaries_bazelisk",
372369
"build_bazel_bazel_7_4_1",
373370
"build_bazel_bazel_8_0_0",
371+
"build_bazel_bazel_9_0_0rc1",
374372
# "build_bazel_bazel_rolling",
375373
"build_bazel_bazel_self",
376374
)

examples/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ lock(
2626
"--universal",
2727
"--python-version=3.9",
2828
],
29-
python_version = "3.9.19",
29+
python_version = "3.9",
3030
)
3131

3232
lock(

examples/bzlmod/MODULE.bazel

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ bazel_dep(name = "rules_java", version = "8.3.1")
2323
# MODULE.bazel.lock is cross-platform friendly, and there are transitive
2424
# dependencies on rules_rust, so we need rules_rust 0.54.1+ where such issues
2525
# were fixed.
26-
bazel_dep(name = "rules_rust", version = "0.54.1")
26+
bazel_dep(name = "rules_rust", version = "0.67.0")
2727

2828
# We next initialize the python toolchain using the extension.
2929
# You can set different Python versions in this block.
@@ -55,7 +55,6 @@ python.override(
5555
# require versions not listed here.
5656
# available_python_versions = [
5757
# "3.10.9",
58-
# "3.9.18",
5958
# "3.9.19",
6059
# # The following is used by the `other_module` and we need to include it here
6160
# # as well.
@@ -65,7 +64,7 @@ python.override(
6564
# instead of rules_python's defaulting to the latest available version,
6665
# controls what full version is used when `3.x` is requested.
6766
minor_mapping = {
68-
"3.9": "3.9.19",
67+
"3.9": "3.9.25",
6968
},
7069
)
7170

examples/multi_python_versions/MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ use_repo(
3535

3636
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
3737
use_repo(pip, "pypi")
38+
3839
pip.parse(
3940
hub_name = "pypi",
4041
python_version = "3.9",

examples/pip_parse/MODULE.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ local_path_override(
99
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
1010
python.toolchain(
1111
# We can specify the exact version.
12-
python_version = "3.9.13",
12+
python_version = "3.9.25",
1313
)
1414

1515
# You can use this repo mapping to ensure that your BUILD.bazel files don't need
1616
# to be updated when the python version changes to a different `3.9` version.
1717
use_repo(
1818
python,
19-
python_3_9 = "python_3_9_13",
19+
python_3_9 = "python_3_9_25",
2020
)
2121

2222
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
@@ -34,7 +34,7 @@ pip.parse(
3434
},
3535
hub_name = "pypi",
3636
# We need to use the same version here as in the `python.toolchain` call.
37-
python_version = "3.9.13",
37+
python_version = "3.9.25",
3838
requirements_lock = "//:requirements_lock.txt",
3939
requirements_windows = "//:requirements_windows.txt",
4040
)

0 commit comments

Comments
 (0)