Skip to content

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

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

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

Conversation

@renovate

@renovate renovate Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
rules_python bazel_dep major 1.9.12.2.0

Release Notes

bazel-contrib/rules_python (rules_python)

v2.2.0

Compare Source

{#v2-2-0-changed}

Changed
  • Renamed most public bzl_library targets from {foo}_bzl to {foo} to follow
    gazelle naming conventions. Deprecated aliases are left for backwards
    compatibility.
  • (binaries/tests) Added a deprecation warning for targets relying on implicit __init__.py creation.

{#v2-2-0-fixed}

Fixed
  • Fixed a flaky error on Windows 2022 when looking up the win32 version during
    site initialization by retrying the lookup
    (#​3721).
  • (coverage) Skip lcov report when no data was collected.
  • (pypi) Fixed experimental_index_url checking truthiness before envsubst
    expansion.
  • (rules) Fixed venv output paths for py_binary and py_test targets whose
    names contain path separators so distinct targets with the same basename no
    longer share the same venv output directory.

{#v2-2-0-added}

Added
  • Added {bzl:obj}features.loadable_symbols to allow detecting public symbols
    exported by bzl files.
  • Exposed {bzl:obj}VenvSymlinkEntry and {bzl:obj}VenvSymlinkKind in
    {bzl:target}//python:py_info.bzl.
  • (pypi) Added @pypi repo: a unified hub of pip.parse hubs.
  • (uv) Support for basic uv.lock generation via the lock rule
    and basic support for importing the uv.lock file itself. Since this
    may have bugs, please report this by creating new tickets.
    Work towards #​2787
    and #​1975.

{#v2-1-0}

v2.1.0

Compare Source

{#v2-1-0-removed}

Removed
  • (build_data) Removed CONFIG_MODE from build data
    (#​3793).
  • (coverage) Support for python 3.8 has been dropped from the bundled
    coverage.py wheel set, since coverage.py 7.6.2 dropped it.

{#v2-1-0-changed}

Changed
  • (bzlmod) How default runtimes are registered has changed to use a manifest
    of SHAs and URLs. TOOL_VERSIONS in python/versions.bzl is now empty under
    bzlmod.
  • (gazelle) WORKSPACE's bazel-gazelle dependency bumped from 0.36.0 to 0.47.0.
    The go version was also bumped from 1.21.13 to 1.22.9.
  • (gazelle) python_generate_pyi_deps and python_generate_pyi_srcs now
    default to true.
  • (pypi) The data files of a wheel (bin, includes, etc) are now always included
    as a library's data dependencies.
  • (coverage) When configure_coverage_tool = True is set but the bundled
    coverage.py wheel set has no entry for the requested python version and
    platform, a warning is now printed instead of silently producing an empty
    coverage report.

{#v2-1-0-fixed}

Fixed
  • (gazelle) py_library and py_test targets with missing source files can now be
    removed by Gazelle (#​3375).
    However map_kind and alias_kind will not be removed unless people are running a
    gazelle version that includes
    bazel-gazelle#2362
  • (bootstrap) Fixed a potential race condition with symlink creation during
    startup.
  • (gazelle) Fixed handling of auto-included __init__.py files when generating py_binary
    targets (#​3729).
  • (entry_point) From now on mypy type checking will be skipped on the generated
    files (#​3126).
  • (pypi) Support --experimental_isolated_extension_usages
    (#​3668).
  • (uv) use the astral.sh mirror as the preferred url for binary downloads,
    with github.com as a fallback; for uv >= 0.11.0, read the checksums directly
    from the dist-manifest contents.
  • (pypi) Fix importlib.metadata.files by ensuring RECORD is included in
    installed wheel targets, except when built from sdist
    (#​3024).
  • (system_python) Fix AttributeError exception on Debian 10 Buster
    python installations which may not set sys._base_executable
    (#​3774).
  • (windows) Fix py_test/py_binary failure when the target name contains
    path separators; the bootstrap stub is now declared as a sibling of the
    .exe launcher
    (#​3789).
  • Fix the forwarding of target_compatible_with from compile_pip_requirements
    towards the underlying *.update target.
    (#​3787)
  • (uv) allow user overwrite the build environment using --action_env to allow
    setting authentication for the index URL.
    (#​3405)
  • (uv) fix the execution of the uv pip compile in the sandbox. Work
    towards better supporting uv out of the box on our platforms.
    (#​1975)
  • (uv) automatically pass the --project parameter based on the source files.
    (#​3087)
  • (coverage) handle nested coverage collection
    (#​3823)

{#v2-1-0-added}

Added
  • (toolchain) Added {obj}PyRuntimeInfo.interpreter_files_to_run so action
    consumers can execute an in-build runtime interpreter with its runfiles.
  • (toolchains) Support dynamically fetching and registering Python runtimes
    from a python-build-standalone manifest file using
    python.override(add_runtime_manifest_urls = ..., runtime_manifest_sha = ...).
  • (toolchain) Added {obj}python.override.toolchain_target_settings to allow
    adding config_setting labels to all registered toolchains.
  • (windows) Full venv support for Windows is available. Set
    {obj}--venvs_site_packages=yes to enable.
  • (test/binaries) When {obj}--venv_site_packages=yes is enabled,
    wheel data, bin, and include files are populated into the venv.
  • (runfiles) Added a pathlib-compatible API: {obj}Runfiles.root()
    Fixes #​3296.
  • (gazelle) Support alias_kind directive.
    Fixes #​3183.
  • (pypi) package_metadata support, fixes
    #​2054.
  • (coverage) Add support for python 3.14 and bump coverage.py to 7.10.7.

{#v2-0-3}

v2.0.3

Compare Source

{#v2-0-3-fixed}

Fixed
  • (pypi) Assume that all of the packages are available on a particular hub if
    there is only a single PyPI compatible index to be used. This saves us an expensive
    PyPI download and supports PyPI mirror implementations that do not support the root
    index functionality. Fixes #​3769.

{#v2-0-2}

v2.0.2

Compare Source

{#v2-0-2-added}

Added
  • (toolchains) 3.13.12, 3.14.3 Python toolchain from 20260325 release.
  • (toolchains) 3.10.20, 3.11.15, 3.12.13, 3.13.13 3.14.4, 3.15.0a8
  • Python toolchain from 20260414 release.

{#v2-0-1}

v2.0.1

Compare Source

{#v2-0-1-fixed}

Fixed
  • (pypi) Fix the versions of packages that we are recording to a MODULE.bazel.lock file
    facts by passing all of the versions to the get_index function.
    Fixes #​3756.
  • (bzlmod) Reduce default verbosity of our loggers for non-root modules
    (#​3749).

{#v2-0-0}

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-1}


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.

@renovate renovate Bot force-pushed the renovate/rules_python-2.x branch from 529f68e to de959e1 Compare May 10, 2026 16:31
@renovate renovate Bot force-pushed the renovate/rules_python-2.x branch 2 times, most recently from 2b18fcf to ba5fc75 Compare May 23, 2026 16:34
@renovate renovate Bot force-pushed the renovate/rules_python-2.x branch from ba5fc75 to 6efccf8 Compare June 16, 2026 06:53
@renovate renovate Bot force-pushed the renovate/rules_python-2.x branch from 6efccf8 to 0445a6b Compare June 29, 2026 04:42
@renovate renovate Bot force-pushed the renovate/rules_python-2.x branch from 0445a6b to b599404 Compare July 4, 2026 09:41
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