Skip to content

Bump rules_python from 1.9.0 to 2.0.0#53

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bazel/rules_python-2.0.0
Closed

Bump rules_python from 1.9.0 to 2.0.0#53
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bazel/rules_python-2.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Apr 29, 2026

Copy link
Copy Markdown
Contributor

Bumps rules_python from 1.9.0 to 2.0.0.

Release notes

Sourced from rules_python's releases.

2.0.0

For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html

For the user-facing changelog see here

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "2.0.0")
python = use_extension("@​rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.13",
)
pip = use_extension("@​rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.13",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")

Using WORKSPACE

Paste this snippet into your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "f4f709b1e354b0089038001854400938962d60d749cd910e12d5883a084510d3",
strip_prefix = "rules_python-2.0.0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.0/rules_python-2.0.0.tar.gz",
)
load("@​rules_python//python:repositories.bzl", "py_repositories")
py_repositories()

Gazelle plugin

Paste this snippet into your WORKSPACE file:

... (truncated)

Changelog

Sourced from rules_python's changelog.

2.0.0 - 2026-04-09

{#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

... (truncated)

Commits
  • 1390b36 fix(pypi): don't resolve python interpreter when not necessary (#3727)
  • 91b3224 fix(pypi): build the environment on the fly (#3720)
  • 577bb1f fix(pypi): correctly write the used facts back (#3719)
  • 8c726cb fix(pypi): skip index lookups when all package overrides are specified (#3710)
  • 8cc468b sphinxdocs: remove local rules_python dev overrides (#3705)
  • 3949cca chore: have no-matching-distribution error message hint about target_platform...
  • 7171c57 fix(sphinxdocs): update MODULE.bazel to depend on a released version (#3704)
  • 7852f8e chore: populate 2.0 for VERSION_NEXT_FEATURE for py_wheel add_path_prefix (#3...
  • ad74ef7 feat!(pypi): enable bazel downloader by default (#3691)
  • c99d2b4 sphinxdoc: move tests and docs to module-root directory (#3690)
  • Additional commits viewable in compare view

@dependabot dependabot Bot added bazel Pull requests that update bazel code dependencies Pull requests that update a dependency file labels Apr 29, 2026
Bumps [rules_python](https://github.com/bazel-contrib/rules_python) from 1.9.0 to 2.0.0.
- [Release notes](https://github.com/bazel-contrib/rules_python/releases)
- [Changelog](https://github.com/bazel-contrib/rules_python/blob/main/CHANGELOG.md)
- [Commits](bazel-contrib/rules_python@1.9.0...2.0.0)

---
updated-dependencies:
- dependency-name: rules_python
  dependency-version: 2.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/bazel/rules_python-2.0.0 branch from 2678615 to 41b0ede Compare May 5, 2026 16:48
@dependabot @github

dependabot Bot commented on behalf of github May 13, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #64.

@dependabot dependabot Bot closed this May 13, 2026
@dependabot dependabot Bot deleted the dependabot/bazel/rules_python-2.0.0 branch May 13, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bazel Pull requests that update bazel code dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants