Skip to content

chore(deps): update dependency rules_python to v2.4.0 - #16536

Merged
scotthart merged 1 commit into
googleapis:mainfrom
renovate-bot:renovate/rules_python-2.x
Oct 5, 2026
Merged

scotthart merged 1 commit into
googleapis:mainfrom
renovate-bot:renovate/rules_python-2.x

Conversation

@renovate-bot

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
rules_python bazel_dep minor 2.3.4 → 2.4.0

Release Notes

bazel-contrib/rules_python (rules_python)

v2.4.0

Compare Source

{#v2-4-0-changed}

Changed
  • (bootstrap) {obj}sys.path adds the Python runtime in runfiles instead
    of the underlying Bazel repository cache directory
    (#​4104).
  • (gazelle) Deprecate the requirements argument of gazelle_python_manifest
    in favor of the format-agnostic lockfiles argument, which supports uv.lock.
  • (toolchain) Updated default Python 3.15 runtime from 3.15.0a8 to 3.15.0rc1
    (#​4122).
  • (toolchain) Updated default Python 3.15 runtime from 3.15.0rc1 to
    3.15.0rc2.
  • (toolchain) Updated the default Python toolchain version from 3.11 to 3.14
    in {obj}python.defaults, {obj}python_register_toolchains, and
    {obj}python_register_multi_toolchains
    (#​4023).
  • (toolchains) Shared libpython*.so* files are now excluded by default from
    hermetic Python runtime files for recognized Astral python-build-standalone
    builds (20250517 and newer), which statically link libpython into the
    interpreter. Older, custom, or unrecognized runtimes retain them. Set
    libpython = "include" or "exclude" on {obj}python.override,
    {obj}python.single_version_override,
    {obj}python.single_version_platform_override, or
    {obj}python_register_toolchains to override this behavior
    (#​4165).

{#v2-4-0-fixed}

Fixed
  • Include the Python toolchain's static libraries when current_py_cc_libs is used
    as a dependency of cc_shared_library.
  • (bzlmod) Fixed a type mismatch error when using {obj}coverage_tool with
    {obj}python.single_version_platform_override
    (#​2570).
  • (precompile) Fixed handling of directory and .pyc file inputs in
    {obj}srcs when {obj}precompile is enabled on {obj}py_library,
    {obj}py_binary, and {obj}py_test targets
    (#​4113).
  • (pypi) Fixed wheel RECORD file generation on Windows so that rewritten shebang
    scripts correctly include the .bat extension
    (#​4114).
  • (pypi) Fixed {obj}RECORD file paths for extracted .data directory contents
    so that {obj}importlib.metadata.files() correctly locates installed
    distribution files (#​4025).
  • (pypi) Venv mode now works on NixOS and no longer requires coreutils to process
    wheel scripts and RECORD files
    (#​4125).
  • (rules) Fixed loading Python extension modules from paths longer than MAX_PATH on Windows.
  • (runfiles) Updated {obj}runfiles.Path method signatures for Python 3.14
    typeshed compatibility and fixed {obj}runfiles.Path.match on Python 3.12+.
    (#​4023)
  • (stamping) The build data spawn action is now skipped when --stamp=false and,
    instead the metadata file is written at analysis time via ctx.actions.write().
  • (toolchain) Fixed a crash in {obj}py_test main validation
    ({obj}validate_test_main) on Windows: the interpreter used for the check
    couldn't find its DLLs or its stdlib once relocated
    (#​4079).
  • (toolchain) Fixed a crash on Windows when precompiling is enabled:
    the precompiler's interpreter couldn't find its DLLs once relocated
    (#​4082).
  • (zipapp) Reduced self-contained archive sizes by preserving Python executable
    symlinks instead of storing each alias as another copy of the interpreter, and
    by omitting shared libpython files from recognized statically linked Astral
    runtime builds.

{#v2-4-0-added}

Added
  • (pypi) py.typed files from wheels are now included in the pyi_srcs of the
    wheel's py_library, alongside .pyi files. The py.typed file of
    //python/runfiles is now included in its pyi_srcs as well.
  • (runfiles) Added {obj}Runfiles.CreateOrRaise to return a Runfiles instance
    or raise an error if runfiles cannot be found.
  • (uv) Added {obj}directory attribute to {obj}lock to support running uv
    commands within subdirectories when generating lock files. Defaults to the
    package directory, set it to None or "" to set it to the root of the repo
    (#​4029).

{#v2-3-4}


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Monday through Friday (* * * * 1-5)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate-bot
renovate-bot requested a review from a team as a code owner October 5, 2026 10:46
@dpebot

dpebot commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

/gcbrun

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the version of the rules_python Bazel dependency from 2.3.4 to 2.4.0 in both the root MODULE.bazel and the ci/verify_bzlmod_latest/MODULE.bazel files. There are no review comments, and I have no feedback to provide.

@codecov

codecov Bot commented Oct 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.35%. Comparing base (54869ea) to head (7280aa4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16536   +/-   ##
=======================================
  Coverage   92.34%   92.35%           
=======================================
  Files        2262     2262           
  Lines      217173   217173           
=======================================
+ Hits       200549   200560   +11     
+ Misses      16624    16613   -11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scotthart
scotthart merged commit 9328ebc into googleapis:main Oct 5, 2026
66 checks passed
@renovate-bot
renovate-bot deleted the renovate/rules_python-2.x branch October 5, 2026 14:29

This branch was successfully deployed

1 active deployment
false — 7280aa4a Deployed Oct 5, 2026 by renovate-bot via Save PR ref #12269
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants