Skip to content

Commit 407ca71

Browse files
authored
Merge branch 'main' into runfiles-fix-upstream
2 parents 2efb538 + e85728f commit 407ca71

File tree

15 files changed

+150
-274
lines changed

15 files changed

+150
-274
lines changed

CHANGELOG.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ BEGIN_UNRELEASED_TEMPLATE
3030
3131
{#v0-0-0-removed}
3232
### Removed
33+
* (toolchain) Remove all of the python 3.9 toolchain versions except for the `3.9.25`.
34+
This version has reached EOL and will no longer receive any security fixes, please update to
35+
`3.10` or above.
3336
34-
* Nothing removed.
3537
{#v0-0-0-changed}
3638
### Changed
37-
* Nothing changed.
39+
* (toolchains) Use toolchains from the [20251031] release.
3840
3941
{#v0-0-0-fixed}
4042
### Fixed
@@ -47,8 +49,9 @@ BEGIN_UNRELEASED_TEMPLATE
4749
4850
{#v0-0-0-added}
4951
### Added
50-
* Nothing added.
52+
* (toolchains) `3.9.25` Python toolchain from [20251031] release.
5153
54+
[20251031]: https://github.com/astral-sh/python-build-standalone/releases/tag/20251031
5255
5356
END_UNRELEASED_TEMPLATE
5457
-->
@@ -79,10 +82,10 @@ END_UNRELEASED_TEMPLATE
7982
* (toolchains) `py_runtime` and `PyRuntimeInfo` reject Python 2 settings.
8083
Setting `py_runtime.python_version = "PY2"` or non-None
8184
`PyRuntimeInfo.py2_runtime` is an error.
82-
* (pypi) `pipstar` flag has been flipped to be enabled by default, to turn it
83-
off use `RULES_PYTHON_ENABLE_PIPSTAR=0` environment variable. If you do, please
85+
* (pypi) `pipstar` flag has been implemented for `WORKSPACE` and can be flipped to be enabled using `RULES_PYTHON_ENABLE_PIPSTAR=1` environment variable. If you do, please
8486
add a comment to
85-
[#2949](https://github.com/bazel-contrib/rules_python/issues/2949).
87+
[#2949](https://github.com/bazel-contrib/rules_python/issues/2949) if you run into any
88+
problems.
8689
With this release we are deprecating {obj}`pip.parse.experimental_target_platforms` and
8790
{obj}`pip_repository.experimental_target_platforms`. For users using `WORKSPACE` and
8891
vendoring the `requirements.bzl` file, please re-vendor so that downstream is unaffected
@@ -117,6 +120,8 @@ END_UNRELEASED_TEMPLATE
117120
([#3339](https://github.com/bazel-contrib/rules_python/issues/3339)).
118121
* (uv) {obj}`//python/uv:lock.bzl%lock` now works with a local platform
119122
runtime.
123+
* (pypi) `linux_riscv64` is added to the platforms list in `_pip_repository_impl`,
124+
which fixes [a build issue for tensorflow on riscv64](https://github.com/bazel-contrib/rules_python/discussions/2729).
120125
* (toolchains) WORKSPACE builds now correctly register musl and freethreaded
121126
variants. Setting {obj}`--py_linux_libc=musl` and `--py_freethreaded=yes` now
122127
activate them, respectively.

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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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/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
)

examples/pip_parse/WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ py_repositories()
1111

1212
python_register_toolchains(
1313
name = "python_3_9",
14-
python_version = "3.9.13",
14+
python_version = "3.9.25",
1515
)
1616

1717
load("@rules_python//python:pip.bzl", "pip_parse")

gazelle/examples/bzlmod_build_file_generation/.bazelrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ common --experimental_enable_bzlmod
77

88
coverage --java_runtime_version=remotejdk_11
99
common:bazel7.x --incompatible_python_disallow_native_rules
10+
11+
# NOTE: This override is specific to the development of gazelle itself
12+
# and the testing of it during its BCR release presubmits.
13+
# In development of gazelle itself, we override it to the development
14+
# rules_python code. In the BCR presubmits, this override is removed
15+
# and the bazel_dep version of rules_python is used.
16+
common --override_module=rules_python=../../../

gazelle/examples/bzlmod_build_file_generation/MODULE.bazel

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,7 @@ module(
1313
# For typical setups you set the version.
1414
# See the releases page for available versions.
1515
# https://github.com/bazel-contrib/rules_python/releases
16-
bazel_dep(name = "rules_python", version = "1.0.0")
17-
18-
# NOTE: This override is removed for BCR presubmits and the version
19-
# specified by bazel_dep() is used instead.
20-
# The following loads rules_python from the file system.
21-
# For usual setups you should remove this local_path_override block.
22-
local_path_override(
23-
module_name = "rules_python",
24-
path = "../../..",
25-
)
16+
bazel_dep(name = "rules_python", version = "1.4.0")
2617

2718
# The following stanza defines the dependency rules_python_gazelle_plugin.
2819
# For typical setups you set the version.

python/private/hermetic_runtime_repo_setup.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,17 @@ def define_hermetic_runtime_toolchain_impl(
179179
"libs/python{major}{minor}t.lib".format(**version_dict),
180180
"libs/python3t.lib",
181181
],
182-
"@platforms//os:linux": [
183-
"lib/libpython{major}.{minor}.so".format(**version_dict),
184-
"lib/libpython{major}.{minor}.so.1.0".format(**version_dict),
185-
],
186182
"@platforms//os:macos": ["lib/libpython{major}.{minor}.dylib".format(**version_dict)],
187183
"@platforms//os:windows": [
188184
"python3.dll",
189185
"python{major}{minor}.dll".format(**version_dict),
190186
"libs/python{major}{minor}.lib".format(**version_dict),
191187
"libs/python3.lib",
192188
],
189+
"//conditions:default": [
190+
"lib/libpython{major}.{minor}.so".format(**version_dict),
191+
"lib/libpython{major}.{minor}.so.1.0".format(**version_dict),
192+
],
193193
}),
194194
)
195195

python/private/internal_config_repo.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ load("//python/private:text_util.bzl", "render")
2222
load(":repo_utils.bzl", "repo_utils")
2323

2424
_ENABLE_PIPSTAR_ENVVAR_NAME = "RULES_PYTHON_ENABLE_PIPSTAR"
25-
_ENABLE_PIPSTAR_DEFAULT = "1"
25+
_ENABLE_PIPSTAR_DEFAULT = "0"
2626
_ENABLE_DEPRECATION_WARNINGS_ENVVAR_NAME = "RULES_PYTHON_DEPRECATION_WARNINGS"
2727
_ENABLE_DEPRECATION_WARNINGS_DEFAULT = "0"
2828

python/private/pypi/pip_repository.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def _pip_repository_impl(rctx):
9696
"linux_aarch64",
9797
"linux_arm",
9898
"linux_ppc",
99+
"linux_riscv64",
99100
"linux_s390x",
100101
"linux_x86_64",
101102
"osx_aarch64",

0 commit comments

Comments
 (0)