Skip to content

chore(deps): update dependency rules_python to v2#6710

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/rules_python-2.x
Open

chore(deps): update dependency rules_python to v2#6710
renovate[bot] wants to merge 1 commit intomainfrom
renovate/rules_python-2.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Apr 28, 2026

This PR contains the following updates:

Package Type Update Change
rules_python http_archive major 1.9.02.0.0

Release Notes

bazelbuild/rules_python (rules_python)

v2.0.0

Compare Source

{#v2-0-0-removed}

Removed
  • Nothing removed.

{#v2-0-0-changed}

Changed

Breaking

  • {obj}--windows_enable_symlinks is required. Add startup --windows_enable_symlinks to your .bazelrc to enable Bazel using full
    symlink support on Windows.
  • venv-based binaries are created by default ({obj}--bootstrap_impl=system_python)
    on supported platforms (Linux/Mac with Bazel 8+, or Windows).
  • --build_python_zip on Windows is ignored. Use {obj}py_zipapp_binary to create
    zips of Python programs.
  • (pypi) Previously experimental_index_url users would not need to specify
    target platforms if cross-building is required. From now we will only pull
    wheels for the host OS to better align with how the rules work with the legacy
    pip implementation. Use {obj}pip.parse.target_platforms to customize the
    behavior.
    Related to #​260.

Other changes:

  • (pypi) Update dependencies used for compile_pip_requirements, building
    sdists in the whl_library rule and fetching wheels using pip.
  • (pypi) Before using the bazel downloader to fetch the PyPI package metadata
    we will from now on fetch the lists of available packages on each index. The
    used package mappings will be written as facts to the MODULE.bazel.lock file
    on supported bazel versions and it should be done at most once. As a result,
    per-package {obj}experimental_index_url_overrides is no longer needed, but
    if specified, it needs to be provided for all packages not on the default index. What
    is more, the flags for --index_url and --extra-index-url now behave in the
    same way as in uv or pip, i.e. we default to --index-url if the package
    is not found in --extra-index-url. Fixes
    (#​3260 and
    #​2632).
  • (uv) We will now use the download URL specified in the uv's
    dist_manifest.json file. If you have redirects or blocking rules as part of
    your downloader setup, you may need to adjust them. What is more, the default
    uv version has been bumped 0.11.2.
  • (runfiles): Type annotations are no longer tested for Python 3.9.
  • Windows no longer defaults to creating a zip file and extracting it; a
    symlink-based runfiles tree is created, as on unix-like platforms.

{#v2-0-0-fixed}

Fixed
  • (toolchain) Also set Make variables for local toolchains.
  • (zipapp) Resolve issue passing through compression settings in
    py_zippapp_binary targets
    (#​3646).
  • (toolchains) The pyc created at runtime in the stdlib should no longer
    cause the Python runtime repository to be invalidated. The stdlib pyc files
    may be reused in between invocations, depending upon the sandboxing
    configuration. See the {any}RULES_PYTHON_PYCACHE_DIR environment variable
    for more information.
    (#​3643).
  • (bootstrap) Fixed incorrect runfiles path construction in bootstrap
    scripts when binary is defined in another bazel module
    (#​3563).
  • (bootstrap) Resolve RUNFILES_DIR inheritance issues, which lead to a child
    Python binary incorrectly using it's parent's Python binary environment
    (#​3518).
  • (uv) Downloads for versions >=0.10 work again. In order to fix this we had
    drop support for powerpc64 platform. People interested in the platform can
    bring it back via the uv.default API. Like:
    uv.default(
        compatible_with = [
            "@​platforms//os:linux",
            "@​platforms//cpu:ppc",
        ],
        platform = "powerpc64-unknown-linux-gnu",
    )
    
    Fixes #​3676.
  • (pypi) Fixes wheel extraction on hosts without python installed,
    Fixes #​3712.

{#v2-0-0-added}

Added
  • (pypi) Write SimpleAPI contents to the MODULE.bazel.lock file if using
    {obj}experimental_index_url which should speed up consecutive
    initializations and should no longer require the network access if the cache is
    hydrated. Implements
    #​2731.
  • (pypi) The --index-url and --extra-index-url is now parsed from the lock
    file and the {obj}pip.parse.experimental_index_url and
    {obj}pip.parse.experimental_extra_index_urls is
    no longer mandatory to leverage the bazel downloader.
    Implements
    #​1357,
    #​2951.
  • (pypi) If cross-compilation is needed, use the {obj}pip.parse.target_platforms
    to specify exactly which platforms should be supported.
    Implements
    #​260.
  • (wheel) Specifying a path ending in / as a destination in data_files
    will now install file(s) to a folder, preserving their basename.
  • Various attributes and fields added to support venvs on Windows:
    • {obj}py_runtime.venv_bin_files and {obj}PyRuntime.venv_binfiles
      field added to specify additional Python runtime files Windows needs for
      venvs.
    • {obj}PyExecutableInfo.venv_interpreter_runfiles, and
      {obj}PyExecutableInfo.venv_interpreter_symlinks adde
  • (wheel) Add support for add_path_prefix argument in py_wheel which can be
    used to prepend a prefix to the files in the wheel.

{#v1-9-0}


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • 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.

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.

0 participants