Skip to content

Commit 7b22783

Browse files
committed
Merge branch 'main' into u/dthor/bump-rules_go-gh2956
2 parents f0921eb + 9b8f650 commit 7b22783

Some content is hidden

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

50 files changed

+547
-197
lines changed

.bazelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# (Note, we cannot use `common --deleted_packages` because the bazel version command doesn't support it)
55
# To update these lines, execute
66
# `bazel run @rules_bazel_integration_test//tools:update_deleted_packages`
7-
build --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered,tests/modules/other,tests/modules/other/nspkg_delta,tests/modules/other/nspkg_gamma,tests/modules/other/nspkg_single
8-
query --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered,tests/modules/other,tests/modules/other/nspkg_delta,tests/modules/other/nspkg_gamma,tests/modules/other/nspkg_single
7+
build --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered,tests/modules/another_module,tests/modules/other,tests/modules/other/nspkg_delta,tests/modules/other/nspkg_gamma,tests/modules/other/nspkg_single,tests/modules/other/simple_v1,tests/modules/other/simple_v2,tests/modules/other/with_external_data
8+
query --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered,tests/modules/another_module,tests/modules/other,tests/modules/other/nspkg_delta,tests/modules/other/nspkg_gamma,tests/modules/other/nspkg_single,tests/modules/other/simple_v1,tests/modules/other/simple_v2,tests/modules/other/with_external_data
99

1010
test --test_output=errors
1111

CHANGELOG.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,20 @@ BEGIN_UNRELEASED_TEMPLATE
4747
END_UNRELEASED_TEMPLATE
4848
-->
4949

50-
{#v0-0-0}
51-
## Unreleased
50+
{#1-5-0}
51+
## [1.5.0] - 2025-06-11
5252

53-
[0.0.0]: https://github.com/bazel-contrib/rules_python/releases/tag/0.0.0
53+
[1.5.0]: https://github.com/bazel-contrib/rules_python/releases/tag/1.5.0
5454

55-
{#v0-0-0-changed}
55+
{#1-5-0-changed}
5656
### Changed
5757

58-
* If using the (deprecated) autodetecting/runtime_env toolchain, then the Python
59-
version specified at build-time *must* match the Python version used at
60-
runtime (the {obj}`--@rules_python//python/config_settings:python_version`
61-
flag and the {attr}`python_version` attribute control the build-time version
62-
for a target). If they don't match, dependencies won't be importable. (Such a
63-
misconfiguration was unlikely to work to begin with; this is called out as an
64-
FYI).
65-
* (rules) {obj}`--bootstrap_impl=script` is the default for non-Windows.
58+
* (toolchain) Bundled toolchain version updates:
59+
* 3.9 now references 3.9.23
60+
* 3.10 now references 3.10.18
61+
* 3.11 now references 3.11.13
62+
* 3.12 now references 3.12.11
63+
* 3.13 now references 3.13.4
6664
* (rules) On Windows, {obj}`--bootstrap_impl=system_python` is forced. This
6765
allows setting `--bootstrap_impl=script` in bazelrc for mixed-platform
6866
environments.
@@ -81,8 +79,9 @@ END_UNRELEASED_TEMPLATE
8179
* Note that this might result in a slight reordering of load statements in
8280
gazelle-generated `BUILD(.bazel)` files to match the ordering set by
8381
buildifier.
82+
* (deps) Updating setuptools to patch CVE-2025-47273.
8483

85-
{#v0-0-0-fixed}
84+
{#1-5-0-fixed}
8685
### Fixed
8786

8887
* (rules) PyInfo provider is now advertised by py_test, py_binary, and py_library;
@@ -108,8 +107,10 @@ END_UNRELEASED_TEMPLATE
108107
* (pypi) Correctly aggregate the sources when the hashes specified in the lockfile differ
109108
by platform even though the same version is used. Fixes [#2648](https://github.com/bazel-contrib/rules_python/issues/2648).
110109
* (pypi) `compile_pip_requirements` test rule works behind the proxy
110+
* (toolchains) The hermetic toolchains now correctly statically advertise the
111+
`releaselevel` and `serial` for pre-release hermetic toolchains ({gh-issue}`2837`).
111112

112-
{#v0-0-0-added}
113+
{#1-5-0-added}
113114
### Added
114115
* Repo utilities `execute_unchecked`, `execute_checked`, and `execute_checked_stdout` now
115116
support `log_stdout` and `log_stderr` keyword arg booleans. When these are `True`
@@ -130,8 +131,9 @@ END_UNRELEASED_TEMPLATE
130131
* (rules) Added support for a using constraints files with `compile_pip_requirements`.
131132
Useful when an intermediate dependency needs to be upgraded to pull in
132133
security patches.
134+
* (toolchains): 3.14.0b2 has been added as a preview.
133135

134-
{#v0-0-0-removed}
136+
{#1-5-0-removed}
135137
### Removed
136138
* Nothing removed.
137139

MODULE.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ bazel_dep(name = "rules_multirun", version = "0.9.0", dev_dependency = True)
8686
bazel_dep(name = "bazel_ci_rules", version = "1.0.0", dev_dependency = True)
8787
bazel_dep(name = "rules_pkg", version = "1.0.1", dev_dependency = True)
8888
bazel_dep(name = "other", version = "0", dev_dependency = True)
89+
bazel_dep(name = "another_module", version = "0", dev_dependency = True)
8990

9091
# Extra gazelle plugin deps so that WORKSPACE.bzlmod can continue including it for e2e tests.
9192
# We use `WORKSPACE.bzlmod` because it is impossible to have dev-only local overrides.
@@ -116,6 +117,11 @@ local_path_override(
116117
path = "tests/modules/other",
117118
)
118119

120+
local_path_override(
121+
module_name = "another_module",
122+
path = "tests/modules/another_module",
123+
)
124+
119125
dev_python = use_extension(
120126
"//python/extensions:python.bzl",
121127
"python",

docs/api/rules_python/python/config_settings/index.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Default: `//python/config_settings:_pip_env_marker_default_config`
167167
This flag points to a target providing {obj}`EnvMarkerInfo`, which determines
168168
the values used when environment markers are resolved at build time.
169169

170-
:::{versionadded} VERSION_NEXT_FEATURE
170+
:::{versionadded} 1.5.0
171171
:::
172172
::::
173173

@@ -245,12 +245,8 @@ Values:
245245
::::{bzl:flag} bootstrap_impl
246246
Determine how programs implement their startup process.
247247

248-
The default for this depends on the platform:
249-
* Windows: `system_python` (**always** used)
250-
* Other: `script`
251-
252248
Values:
253-
* `system_python`: Use a bootstrap that requires a system Python available
249+
* `system_python`: (default) Use a bootstrap that requires a system Python available
254250
in order to start programs. This requires
255251
{obj}`PyRuntimeInfo.bootstrap_template` to be a Python program.
256252
* `script`: Use a bootstrap that uses an arbitrary executable script (usually a
@@ -273,11 +269,6 @@ instead.
273269
:::{versionadded} 0.33.0
274270
:::
275271

276-
:::{versionchanged} VERSION_NEXT_FEATURE
277-
* The default for non-Windows changed from `system_python` to `script`.
278-
* On Windows, the value is forced to `system_python`.
279-
:::
280-
281272
::::
282273

283274
::::{bzl:flag} current_config

docs/environment-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The default became `1` if unspecified
6565
When `1`, the rules_python Starlark implementation of the pypi/pip integration is used
6666
instead of the legacy Python scripts.
6767

68-
:::{versionadded} VERSION_NEXT_FEATURE
68+
:::{versionadded} 1.5.0
6969
:::
7070
::::
7171

docs/toolchains.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ that can be used with `target_settings`. Some particular ones of note are:
305305
{flag}`--py_linux_libc` and {flag}`--py_freethreaded`, among others.
306306
:::
307307

308-
:::{versionadded} VERSION_NEXT_FEATURE
308+
:::{versionadded} 1.5.0
309309
Added support for custom platform names, `target_compatible_with`, and
310310
`target_settings` with `single_version_platform_override`.
311311
:::
@@ -436,8 +436,8 @@ local_runtime_repo = use_repo_rule(
436436
)
437437

438438
local_runtime_toolchains_repo = use_repo_rule(
439-
"@rules_python//python/local_toolchains:repos.bzl"
440-
"local_runtime_toolchains_repo"
439+
"@rules_python//python/local_toolchains:repos.bzl",
440+
"local_runtime_toolchains_repo",
441441
dev_dependency = True,
442442
)
443443

internal_dev_deps.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ def rules_python_internal_deps():
4848
path = "tests/modules/other",
4949
)
5050

51+
local_repository(
52+
name = "another_module",
53+
path = "tests/modules/another_module",
54+
)
55+
5156
http_archive(
5257
name = "bazel_skylib",
5358
sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",

python/config_settings/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ string_flag(
9090

9191
rp_string_flag(
9292
name = "bootstrap_impl",
93-
build_setting_default = BootstrapImplFlag.SCRIPT,
93+
build_setting_default = BootstrapImplFlag.SYSTEM_PYTHON,
9494
override = select({
9595
# Windows doesn't yet support bootstrap=script, so force disable it
9696
":_is_windows": BootstrapImplFlag.SYSTEM_PYTHON,

python/features.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _features_typedef():
3535
3636
True if the `PyInfo.venv_symlinks` field is available.
3737
38-
:::{versionadded} VERSION_NEXT_FEATURE
38+
:::{versionadded} 1.5.0
3939
:::
4040
::::
4141

python/private/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,11 +450,13 @@ bzl_library(
450450
":attributes_bzl",
451451
":common_bzl",
452452
":flags_bzl",
453+
":normalize_name_bzl",
453454
":precompile_bzl",
454455
":py_cc_link_params_info_bzl",
455456
":py_internal_bzl",
456457
":rule_builders_bzl",
457458
":toolchain_types_bzl",
459+
":version_bzl",
458460
"@bazel_skylib//lib:dicts",
459461
"@bazel_skylib//rules:common_settings",
460462
],

0 commit comments

Comments
 (0)