From c0880bf772aea171d9773e7c855d1873d09c26aa Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 17 Jan 2024 00:18:33 -0800 Subject: [PATCH 1/2] feat: enable rules_python Starlark implemention by default for Bazel 7+ This makes the base rules use the Starlark code in rules_python ("pystar") instead of what is built into Bazel 7. The pystar implementation can be disabled by setting `RULES_PYTHON_ENABLE_PYSTAR=0` in your environment or using `--action_env`. Earlier versions of Bazel continue to use the rules built into Bazel regardless (the new implementation requires special APIs that only Bazel 7 has). Work towards https://github.com/bazelbuild/rules_python/issues/1069 --- python/private/internal_config_repo.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/private/internal_config_repo.bzl b/python/private/internal_config_repo.bzl index 282eb0b10a..7be34aef8f 100644 --- a/python/private/internal_config_repo.bzl +++ b/python/private/internal_config_repo.bzl @@ -19,7 +19,7 @@ settings for rules to later use. """ _ENABLE_PYSTAR_ENVVAR_NAME = "RULES_PYTHON_ENABLE_PYSTAR" -_ENABLE_PYSTAR_DEFAULT = "0" +_ENABLE_PYSTAR_DEFAULT = "1" _CONFIG_TEMPLATE = """\ config = struct( From e1fbc6858a376a57e10724b4e45c1a3aa5644be2 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Mon, 22 Jan 2024 16:31:56 -0800 Subject: [PATCH 2/2] add changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58a872d3fb..abdbfa45ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,14 @@ A brief description of the categories of changes: [0.XX.0]: https://github.com/bazelbuild/rules_python/releases/tag/0.XX.0 +### Changed + +* For Bazel 7, the core rules and providers are now implemented in rules_python + directly and the rules bundled with Bazel are not used. Bazel 6 and earlier + continue to use the Bazel builtin symbols. Of particular note, this means, + under Bazel 7, the builtin global symbol `PyInfo` is **not** the same as what + is loaded from rules_python. + ## 0.29.0 - 2024-01-22 [0.29.0]: https://github.com/bazelbuild/rules_python/releases/tag/0.29.0