NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1384 most downloaded on PyPI
Last release 3 days ago
01 Oct 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
117 releases · first in 2023
One column per quarter.
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.4.0-rc3")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.14",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.14",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "acf425401f347cec1e2a5efbb97f1fa4930e180996ab00594e19c300dfa45319",
strip_prefix = "rules_python-2.4.0-rc3",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.4.0-rc3/rules_python-2.4.0-rc3.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "acf425401f347cec1e2a5efbb97f1fa4930e180996ab00594e19c300dfa45319",
strip_prefix = "rules_python-2.4.0-rc3/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.4.0-rc3/rules_python-2.4.0-rc3.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()Full Changelog: 2.4.0-rc2...2.4.0-rc3
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.4.0-rc2")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.14",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.14",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "a97164eb05b089d421dea53edb77a64ae5b10ab97b49dbb53c6a42b5bcf32903",
strip_prefix = "rules_python-2.4.0-rc2",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.4.0-rc2/rules_python-2.4.0-rc2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "a97164eb05b089d421dea53edb77a64ae5b10ab97b49dbb53c6a42b5bcf32903",
strip_prefix = "rules_python-2.4.0-rc2/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.4.0-rc2/rules_python-2.4.0-rc2.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()Full Changelog: 2.4.0-rc1...2.4.0-rc2
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.4.0-rc1")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.14",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.14",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "58fd35411be71dc5db35a349f0c341b9c8f8491bb5502bab9a89ab5bc733610f",
strip_prefix = "rules_python-2.4.0-rc1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.4.0-rc1/rules_python-2.4.0-rc1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "58fd35411be71dc5db35a349f0c341b9c8f8491bb5502bab9a89ab5bc733610f",
strip_prefix = "rules_python-2.4.0-rc1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.4.0-rc1/rules_python-2.4.0-rc1.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()Full Changelog: 2.4.0-rc0...2.4.0-rc1
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.4.0-rc0")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.14",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.14",
requirements_lock = "//:requirements_lock.txt",
)
use_repo(pip, "pypi")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "2e600c6842f47e21fcc2d7df32c5a6430c54bd7f5489e40408bc11903eeb11ce",
strip_prefix = "rules_python-2.4.0-rc0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.4.0-rc0/rules_python-2.4.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "2e600c6842f47e21fcc2d7df32c5a6430c54bd7f5489e40408bc11903eeb11ce",
strip_prefix = "rules_python-2.4.0-rc0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.4.0-rc0/rules_python-2.4.0-rc0.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()py_test main validation by @rdesgroppes in #4079Note truncated.
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.3.4")
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")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "a535712f12ba25253d73975ba2932994b5e53773f94b58fb3f8fa7827de8b6b7",
strip_prefix = "rules_python-2.3.4",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.4/rules_python-2.3.4.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "a535712f12ba25253d73975ba2932994b5e53773f94b58fb3f8fa7827de8b6b7",
strip_prefix = "rules_python-2.3.4/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.4/rules_python-2.3.4.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()Full Changelog: 2.3.3...2.3.4
{#v2-3-4-added}
i686-pc-windows-msvc) Python runtimes for
versions 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.13, and 3.14.4
(#4156).{#v2-3-3}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.3.3")
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")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "f700c75859a827a2e3e3ba4c9c0ec2d796e191bf0438ac3fee0b7851d83a3d4c",
strip_prefix = "rules_python-2.3.3",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.3/rules_python-2.3.3.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "f700c75859a827a2e3e3ba4c9c0ec2d796e191bf0438ac3fee0b7851d83a3d4c",
strip_prefix = "rules_python-2.3.3/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.3/rules_python-2.3.3.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()Full Changelog: 2.3.2...2.3.3
{#v2-3-3-changed}
{#v2-3-3-fixed}
PyRuntimeInfo with files = None so creating
zipapp archives does not error.{#v2-3-2}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.3.2")
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")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "25a00d55e4376ef6d9f28938b68038faca17c95580c9afe6953e7dde013d00e4",
strip_prefix = "rules_python-2.3.2",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.2/rules_python-2.3.2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "25a00d55e4376ef6d9f28938b68038faca17c95580c9afe6953e7dde013d00e4",
strip_prefix = "rules_python-2.3.2/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.2/rules_python-2.3.2.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()Full Changelog: 2.3.1...2.3.2
{#v2-3-2-fixed}
pip.parse for source-less wheels with
dependencies. (#4053)pip_archive and {obj}whl_archive
repository rules within the {obj}whl_library. From now on we are dropping unsupported args.pip.parse repository names for Git sources in uv.lock
files by excluding URL query and fragment components
(#4084).{#v2-3-1}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.3.1")
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")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "678358df0f4ae7f00a33ce33cced97c301f3c523bdd71cb2573d20a93efbf6c6",
strip_prefix = "rules_python-2.3.1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.1/rules_python-2.3.1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "678358df0f4ae7f00a33ce33cced97c301f3c523bdd71cb2573d20a93efbf6c6",
strip_prefix = "rules_python-2.3.1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.1/rules_python-2.3.1.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()Full Changelog: 2.3.0...2.3.1
{#v2-3-1-fixed}
{#v2-3-0}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.3.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")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "70c519e8f0a5d9244c0d3496a6993bd42edf111c4499b68ce2f155c26fc8d4ee",
strip_prefix = "rules_python-2.3.0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.0/rules_python-2.3.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "70c519e8f0a5d9244c0d3496a6993bd42edf111c4499b68ce2f155c26fc8d4ee",
strip_prefix = "rules_python-2.3.0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.0/rules_python-2.3.0.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()data attribute to compile_pip_requirements and forward it to the generated py_binary by @granatam in #3865Note truncated.
{#v2-3-0-changed}
is_python_3.14, which earlier
versions do not define.{#v2-3-0-fixed}
py_binary_rule_builder() / py_test_rule_builder() (from python/api/executables.bzl)
failing at analysis time with a visibility error when used to construct a custom rule from an
external module.data attribute and forward it
directly to the generated py_binary, so files passed via data can be
referenced from extra_args using $(location ...).coverage.py wheel is no longer
emitted as we are now falling back to a pure python wheel
(#3950).python_version 3.13 and 3.14; previously both fell back to the 3.11 list, so modules
added or removed since then (e.g. compression.zstd, telnetlib) were misclassified. The
fallback list for unrecognized versions is now the newest available one rather than 3.11
(#3978).uv_lock to be specified in pip.parse without requiring
requirements_lock (or other os-specific requirement file attributes) to be
set.pkg[extra] entries in a package's own Requires-Dist). The loop compared
the number of extras discovered in the current round against the number known
before it, rather than against the size of the merged set. As a result it
could stop before every extra was resolved, silently dropping dependencies
only reachable through two or more pkg[extra] hops, and for the common case
of a package with no self-referencing extras it never converged at all,
running all 10000 rounds while evaluating each wheel's generated BUILD file
(#4039).--hash=<algo>:<digest> pins and Simple API
#<algo>=<digest> URL fragments are now parsed for all hash algorithms
instead of silently dropping everything except sha256. Non-sha256 pins are
matched against the digests advertised by the index and downloads are verified
using the corresponding Subresource Integrity value, and the pins are kept in
the requirement line when falling back to pip
(#3972).
As part of this, whl_library repos created by pip.parse now always pass
the digest via the integrity attribute (SRI format) instead of sha256,
and the lock file facts store digests as <algo>:<digest> values (the facts
version was bumped, so cached index information is refreshed once).pip.parse(uv_lock = ...) no longer exposes uv workspace/root members
that resolve to no wheel or sdist (e.g. source = { virtual = "." } or editable
installs). Previously these source-less packages were added to the hub's
all_requirements / all_whl_requirements with an alias to a subpackage that
does not exist, breaking analysis for anything enumerating the full set such as
modules_mapping(wheels = all_whl_requirements)
(#3934).index_url for each wheel so that the source registry is forwarded to
the {obj}whl_library. This is so that the purl for package_metadata can be correctly
constructed.file://<absolute_path> for linux and windows like paths. We also support
envsubst for the said paths from now on.{#v2-3-0-added}
build_python_zip, incompatible_default_to_explicit_init_py,
python_path, and experimental_python_import_all_repositories.{obj}explicit_init_py tag class to the `{obj}`config module extension for configuring implicit __init__.py file
generation module-wide.
(#3997,
#2945)py_extension macro for creating C/C++ Python
extension modules
(#3283).
(cc) Added libc, platform_machine, platform_tag, soabi, and
sys_platform attributes and info fields to {obj}py_cc_toolchain /
{obj}PyCcToolchainInfo.pyproject_toml attribute to {obj}pip.default, {obj}pip.parse and {obj}python.defaults to read the default Python version from the requires-python field of pyproject.toml.py_test targets that silently
pass without running any tests. Set
{obj}--@rules_python//python/config_settings:validate_test_main=enabled to
fail the build when a test's main module only contains inert top-level
statements (definitions, imports, assignments) and never invokes a test
runner (#3824).{#v2-2-0}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.3.0-rc2")
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")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "f4cd893907e7851cecabf5d1ed2a8eda5ee027f189d808c4bba74c33ee96ffb0",
strip_prefix = "rules_python-2.3.0-rc2",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.0-rc2/rules_python-2.3.0-rc2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "f4cd893907e7851cecabf5d1ed2a8eda5ee027f189d808c4bba74c33ee96ffb0",
strip_prefix = "rules_python-2.3.0-rc2/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.0-rc2/rules_python-2.3.0-rc2.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()Full Changelog: 2.3.0-rc1...2.3.0-rc2
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.3.0-rc1")
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")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "2d0c04e94f8f173d07db0b1e452a41c77672c051c2bb085caa212507558f393f",
strip_prefix = "rules_python-2.3.0-rc1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.0-rc1/rules_python-2.3.0-rc1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "2d0c04e94f8f173d07db0b1e452a41c77672c051c2bb085caa212507558f393f",
strip_prefix = "rules_python-2.3.0-rc1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.0-rc1/rules_python-2.3.0-rc1.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()Full Changelog: 2.3.0-rc0...2.3.0-rc1
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.3.0-rc0")
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")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "5ca87b04971e29b6bf5cd22c6b6581530291893eb31870d75bc46d0f7dd38386",
strip_prefix = "rules_python-2.3.0-rc0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.0-rc0/rules_python-2.3.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "5ca87b04971e29b6bf5cd22c6b6581530291893eb31870d75bc46d0f7dd38386",
strip_prefix = "rules_python-2.3.0-rc0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.3.0-rc0/rules_python-2.3.0-rc0.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()data attribute to compile_pip_requirements and forward it to the generated py_binary by @granatam in #3865Note truncated.
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.2.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")Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "e11d2e1efce1589e5bdfa93986712c74fc7467a0f093143d489d2ef5ebb1ed2a",
strip_prefix = "rules_python-2.2.0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.2.0/rules_python-2.2.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "e11d2e1efce1589e5bdfa93986712c74fc7467a0f093143d489d2ef5ebb1ed2a",
strip_prefix = "rules_python-2.2.0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.2.0/rules_python-2.2.0.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()Full Changelog: 2.1.0...2.2.0
{#v2-2-0-changed}
{foo}_bzl to {foo} to follow
gazelle naming conventions. Deprecated aliases are left for backwards
compatibility.__init__.py creation.{#v2-2-0-fixed}
cat.experimental_index_url checking truthiness before envsubst
expansion.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}
features.loadable_symbols to allow detecting public symbols
exported by bzl files.VenvSymlinkEntry and {bzl:obj}VenvSymlinkKind in
{bzl:target}//python:py_info.bzl.@pypi repo: a unified hub of pip.parse hubs.dep tag class to the pip bzlmod extension. This allows
modules to declare abstract PyPI dependencies, ensuring target structures
exist in the unified hub, while allowing other modules to provide the
concrete implementation via pip.parse.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}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.2.0-rc1")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "07e7f836037e9d3d323005124663f92df5a00b3ea70356a775523b226cadfcc0",
strip_prefix = "rules_python-2.2.0-rc1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.2.0-rc1/rules_python-2.2.0-rc1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "07e7f836037e9d3d323005124663f92df5a00b3ea70356a775523b226cadfcc0",
strip_prefix = "rules_python-2.2.0-rc1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.2.0-rc1/rules_python-2.2.0-rc1.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/2.2.0-rc0...2.2.0-rc1
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.2.0-rc0")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "9324bb2ea2dab82cb8dc5d7526674711fb370959199d11955b2a7dd31c648d34",
strip_prefix = "rules_python-2.2.0-rc0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.2.0-rc0/rules_python-2.2.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "9324bb2ea2dab82cb8dc5d7526674711fb370959199d11955b2a7dd31c648d34",
strip_prefix = "rules_python-2.2.0-rc0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.2.0-rc0/rules_python-2.2.0-rc0.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/2.1.0...2.2.0-rc0
fix: Updating setuptools to patch CVE-2025-47273 by @aaronmaxlevy in https://github.com/bazel-contrib/rules_python/pull/2955
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.1.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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "5453dafcb177e886961cd1ec9812972316db4beca5ca379916a627732d4b7d11",
strip_prefix = "rules_python-2.1.0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.1.0/rules_python-2.1.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "5453dafcb177e886961cd1ec9812972316db4beca5ca379916a627732d4b7d11",
strip_prefix = "rules_python-2.1.0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.1.0/rules_python-2.1.0.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()
--no_legacy_external_runfiles by @FrankPortman in https://github.com/bazel-contrib/rules_python/pull/2772METADATA correctly if given empty requires_file by @FrankPortman in https://github.com/bazel-contrib/rules_python/pull/2771pip_compile generate a *.test target; deprecate *_test by @dougthor42 in https://github.com/bazel-contrib/rules_python/pull/2812python.ParserOutput are now all public by @yushan26 in https://github.com/bazel-contrib/rules_python/pull/2959include_pytest_conftest annotation by @dougthor42 in https://github.com/bazel-contrib/rules_python/pull/3080python_proto_naming_convention directive controls py_proto_library naming by @shaldengeki in https://github.com/bazel-contrib/rules_python/pull/3093has_py3_only_sources in the PyInfo constructor by @oprypin in https://github.com/bazel-contrib/rules_python/pull/3315py_console_script_binary compatible with symbolic macros by @janwinkler1 in https://github.com/bazel-contrib/rules_python/pull/3195pip.default arguments in multi-platform example by @hartikainen in https://github.com/bazel-contrib/rules_python/pull/3358lock rule has no implicit test target by @martis42 in https://github.com/bazel-contrib/rules_python/pull/3411_py_toolchain_type py_binary attribute by @rickeylev in https://github.com/bazel-contrib/rules_python/pull/3560versionadded details to some Gazelle directives.md by @dougthor42 in https://github.com/bazel-contrib/rules_python/pull/3624py_zipapp_binary target by @nate-england in https://github.com/bazel-contrib/rules_python/pull/3653Note truncated.
{#v2-1-0-removed}
coverage.py wheel set, since coverage.py 7.6.2 dropped it.{#v2-1-0-changed}
TOOL_VERSIONS in python/versions.bzl is now empty under
bzlmod.python_generate_pyi_deps and python_generate_pyi_srcs now
default to true.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}
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__init__.py files when generating py_binary
targets (#3729).mypy type checking will be skipped on the generated
files (#3126).--experimental_isolated_extension_usages
(#3668).importlib.metadata.files by ensuring RECORD is included in
installed wheel targets, except when built from sdist
(#3024).sys._base_executable
(#3774).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).target_compatible_with from compile_pip_requirements
towards the underlying *.update target.
(#3787)--action_env to allow
setting authentication for the index URL.
(#3405)uv pip compile in the sandbox. Work
towards better supporting uv out of the box on our platforms.
(#1975)--project parameter based on the source files.
(#3087){#v2-1-0-added}
PyRuntimeInfo.interpreter_files_to_run so action
consumers can execute an in-build runtime interpreter with its runfiles.python.override(add_runtime_manifest_urls = ..., runtime_manifest_sha = ...).python.override.toolchain_target_settings to allow
adding config_setting labels to all registered toolchains.--venvs_site_packages=yes to enable.--venv_site_packages=yes is enabled,
wheel data, bin, and include files are populated into the venv.Runfiles.root()
Fixes #3296.package_metadata support, fixes
#2054.coverage.py to 7.10.7.{#v2-0-3}
chore: print zipapp deprecation for non-windows platforms by @rickeylev in https://github.com/bazel-contrib/rules_python/pull/3591
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.1.0-rc0")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "8c8c28f9fc1cc8fd2a24df47deb9da8dc0d5567fa5ab48085515fa92c8cb56d0",
strip_prefix = "rules_python-2.1.0-rc0",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.1.0-rc0/rules_python-2.1.0-rc0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "8c8c28f9fc1cc8fd2a24df47deb9da8dc0d5567fa5ab48085515fa92c8cb56d0",
strip_prefix = "rules_python-2.1.0-rc0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.1.0-rc0/rules_python-2.1.0-rc0.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()
_py_toolchain_type py_binary attribute by @rickeylev in https://github.com/bazel-contrib/rules_python/pull/3560versionadded details to some Gazelle directives.md by @dougthor42 in https://github.com/bazel-contrib/rules_python/pull/3624py_zipapp_binary target by @nate-england in https://github.com/bazel-contrib/rules_python/pull/3653pip.parse by @ouillie in https://github.com/bazel-contrib/rules_python/pull/3669Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.8.0-rc1...2.1.0-rc0
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.0.3")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "2610f57b934dc55d1df2728290199519b11cc53508dec34fd5ef0424bcb50242",
strip_prefix = "rules_python-2.0.3",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.3/rules_python-2.0.3.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "2610f57b934dc55d1df2728290199519b11cc53508dec34fd5ef0424bcb50242",
strip_prefix = "rules_python-2.0.3/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.3/rules_python-2.0.3.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/2.0.2...2.0.3
{#v2-0-3-fixed}
{#v2-0-2}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.0.2")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "2119ca04726066c53b8f1ff42dffa090ea7f3e42a75679f1cfda937406cf7753",
strip_prefix = "rules_python-2.0.2",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.2/rules_python-2.0.2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "2119ca04726066c53b8f1ff42dffa090ea7f3e42a75679f1cfda937406cf7753",
strip_prefix = "rules_python-2.0.2/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.2/rules_python-2.0.2.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/2.0.1...2.0.2
{#v2-0-2-added}
3.13.12, 3.14.3 Python toolchain from 20260325 release.3.10.20, 3.11.15, 3.12.13, 3.13.13 3.14.4, 3.15.0a8{#v2-0-1}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.0.1")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "d4dd58e857a7c1bfc7da68adaef1178a20b197b1176c877afd2373369857e65c",
strip_prefix = "rules_python-2.0.1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.1/rules_python-2.0.1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "d4dd58e857a7c1bfc7da68adaef1178a20b197b1176c877afd2373369857e65c",
strip_prefix = "rules_python-2.0.1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.1/rules_python-2.0.1.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/2.0.0...2.0.1
{#v2-0-1-fixed}
MODULE.bazel.lock file
facts by passing all of the versions to the get_index function.
Fixes #3756.{#v2-0-0}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
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")
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()
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "f4f709b1e354b0089038001854400938962d60d749cd910e12d5883a084510d3",
strip_prefix = "rules_python-2.0.0/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.0/rules_python-2.0.0.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()
py_zipapp_binary target by @nate-england in https://github.com/bazel-contrib/rules_python/pull/3653Full Changelog: https://github.com/bazel-contrib/rules_python/compare/1.9.0...2.0.0
{#v2-0-0-removed}
{#v2-0-0-changed}
Breaking
--windows_enable_symlinks is required. Add startup --windows_enable_symlinks to your .bazelrc to enable Bazel using full
symlink support on Windows.--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.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:
compile_pip_requirements, building
sdists in the whl_library rule and fetching wheels using pip.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'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.{#v2-0-0-fixed}
py_zippapp_binary targets
(#3646).RULES_PYTHON_PYCACHE_DIR environment variable
for more information.
(#3643).RUNFILES_DIR inheritance issues, which lead to a child
Python binary incorrectly using it's parent's Python binary environment
(#3518).>=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.{#v2-0-0-added}
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.--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.pip.parse.target_platforms
to specify exactly which platforms should be supported.
Implements
#260./ as a destination in data_files
will now install file(s) to a folder, preserving their basename.py_runtime.venv_bin_files and {obj}PyRuntime.venv_binfiles
field added to specify additional Python runtime files Windows needs for
venvs.PyExecutableInfo.venv_interpreter_runfiles, and
{obj}PyExecutableInfo.venv_interpreter_symlinks addeadd_path_prefix argument in py_wheel which can be
used to prepend a prefix to the files in the wheel.{#v1-9-1}
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.0.0-rc4")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "e249ed0ec948f3f27bd2a551e1e30493a8720231edcc0152fe24fc948e9fdb03",
strip_prefix = "rules_python-2.0.0-rc4",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.0-rc4/rules_python-2.0.0-rc4.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "e249ed0ec948f3f27bd2a551e1e30493a8720231edcc0152fe24fc948e9fdb03",
strip_prefix = "rules_python-2.0.0-rc4/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.0-rc4/rules_python-2.0.0-rc4.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/2.0.0-rc3...2.0.0-rc4
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.0.0-rc3")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "29c9420b5f8fa4e51fd475517186c07a5b0c2269163ce6537e63e5344faca01a",
strip_prefix = "rules_python-2.0.0-rc3",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.0-rc3/rules_python-2.0.0-rc3.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "29c9420b5f8fa4e51fd475517186c07a5b0c2269163ce6537e63e5344faca01a",
strip_prefix = "rules_python-2.0.0-rc3/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.0-rc3/rules_python-2.0.0-rc3.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/2.0.0-rc2...2.0.0-rc3
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.0.0-rc2")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "f8952649277165e482e6234195ffd7aac535dab78a0546dbd70bbe576f1d8685",
strip_prefix = "rules_python-2.0.0-rc2",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.0-rc2/rules_python-2.0.0-rc2.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "f8952649277165e482e6234195ffd7aac535dab78a0546dbd70bbe576f1d8685",
strip_prefix = "rules_python-2.0.0-rc2/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.0-rc2/rules_python-2.0.0-rc2.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/2.0.0-rc1...2.0.0-rc2
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
For the user-facing changelog see here
Add to your MODULE.bazel file:
bazel_dep(name = "rules_python", version = "2.0.0-rc1")
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")
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "12c176a65700317e7750ae34196ad3a595af37338b2c322ae30fed70b5a807d1",
strip_prefix = "rules_python-2.0.0-rc1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.0-rc1/rules_python-2.0.0-rc1.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
Paste this snippet into your WORKSPACE file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python_gazelle_plugin",
sha256 = "12c176a65700317e7750ae34196ad3a595af37338b2c322ae30fed70b5a807d1",
strip_prefix = "rules_python-2.0.0-rc1/gazelle",
url = "https://github.com/bazel-contrib/rules_python/releases/download/2.0.0-rc1/rules_python-2.0.0-rc1.tar.gz",
)
# To compile the rules_python gazelle extension from source,
# we must fetch some third-party go dependencies that it uses.
load("@rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")
_py_gazelle_deps()
Full Changelog: https://github.com/bazel-contrib/rules_python/compare/2.0.0-rc0...2.0.0-rc1
Your coding agent can read these notes before it upgrades. Set up the MCP server →