From fae0f1b85d63a51cb2d2e1fed300b1cc9f802b39 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Thu, 29 Oct 2026 18:18:35 -0700 Subject: [PATCH 1/2] fix(toolchains): include libpython in python_repository attrs `_python_repository_impl` omitted `libpython` from its returned reproducibility `attrs` dict, causing Bazel < 8.3.0 and non-`sha256` invocations to emit a spurious `DEBUG` warning about dropping `["libpython"]`. Include `libpython` in `attrs` so Bazel preserves the attribute without warning. --- news/python-repository-libpython-warning.fixed.md | 2 ++ python/private/python_repository.bzl | 1 + 2 files changed, 3 insertions(+) create mode 100644 news/python-repository-libpython-warning.fixed.md diff --git a/news/python-repository-libpython-warning.fixed.md b/news/python-repository-libpython-warning.fixed.md new file mode 100644 index 0000000000..c7d2b36d4a --- /dev/null +++ b/news/python-repository-libpython-warning.fixed.md @@ -0,0 +1,2 @@ +(toolchains) Fixed a spurious Bazel reproducibility debug warning about dropping +the `libpython` attribute on {obj}`python_repository`. diff --git a/python/private/python_repository.bzl b/python/private/python_repository.bzl index d5ec92f612..5a895536c2 100644 --- a/python/private/python_repository.bzl +++ b/python/private/python_repository.bzl @@ -322,6 +322,7 @@ define_hermetic_runtime_toolchain_impl( "coverage_tool": rctx.attr.coverage_tool, "distutils": rctx.attr.distutils, "distutils_content": rctx.attr.distutils_content, + "libpython": rctx.attr.libpython, "name": rctx.attr.name, "netrc": rctx.attr.netrc, "patch_strip": rctx.attr.patch_strip, From 4666ed0c530dcdf657976fcd1da7275a6d5618ff Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Thu, 29 Oct 2026 18:28:24 -0700 Subject: [PATCH 2/2] refactor(toolchains): drop news entry for libpython attrs fix The debug message only appeared under repository debugging or older Bazel versions and is too minor for release notes. Remove the news fragment. --- news/python-repository-libpython-warning.fixed.md | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 news/python-repository-libpython-warning.fixed.md diff --git a/news/python-repository-libpython-warning.fixed.md b/news/python-repository-libpython-warning.fixed.md deleted file mode 100644 index c7d2b36d4a..0000000000 --- a/news/python-repository-libpython-warning.fixed.md +++ /dev/null @@ -1,2 +0,0 @@ -(toolchains) Fixed a spurious Bazel reproducibility debug warning about dropping -the `libpython` attribute on {obj}`python_repository`.