Skip to content

Releases: bazel-contrib/rules_python

1.7.0-rc0

15 Oct 01:17

Choose a tag to compare

1.7.0-rc0 Pre-release
Pre-release

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 = "1.7.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")

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 = "a3024b21888b8299da01e2567516e084629ae7e0c17e78b966a1c77397e87f97", strip_prefix = "rules_python-1.7.0-rc0", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc0/rules_python-1.7.0-rc0.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") py_repositories()

Gazelle plugin

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 = "a3024b21888b8299da01e2567516e084629ae7e0c17e78b966a1c77397e87f97", strip_prefix = "rules_python-1.7.0-rc0/gazelle", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.7.0-rc0/rules_python-1.7.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()

What's Changed

  • fix(bootstrap): handle when runfiles env vars don't point to current binary's runfiles by @rickeylev in #3192
  • docs: fix a couple typos in the changelog by @rickeylev in #3208
  • chore: release helper tool by @rickeylev in #3206
  • docs: fix changelog header anchors by @rickeylev in #3207
  • fix(gazelle): Do not build proto targets with default Gazelle by @dougthor42 in #3216
  • chore: create workflow to check the do-not-merge label by @rickeylev in #3213
  • docs: Add 1.5.4 release notes to changelog by @rickeylev in #3221
  • build(deps): bump requests from 2.32.4 to 2.32.5 in /tools/publish by @dependabot[bot] in #3214
  • docs: tell how to push one tag; that rc start with n=0 by @rickeylev in #3222
  • build(deps): bump typing-extensions from 4.14.1 to 4.15.0 in /docs by @dependabot[bot] in #3212
  • build(deps): bump requests from 2.32.4 to 2.32.5 in /docs by @dependabot[bot] in #3211
  • cleanup: remove support for extra actions by @comius in #3210
  • build(deps): bump docutils from 0.21.2 to 0.22 in /docs by @dependabot[bot] in #3166
  • chore: add AGENTS.md to help AI agents work with rules_python by @rickeylev in #3227
  • build(deps): bump rich from 13.9.4 to 14.1.0 in /tools/publish by @dependabot[bot] in #3230
  • build(deps): bump charset-normalizer from 3.4.2 to 3.4.3 in /tools/publish by @dependabot[bot] in #3231
  • chore: allow release workflow to be manually run and skip pypi upload by @rickeylev in #3232
  • chore: make release tool auto detect next version by @rickeylev in #3219
  • build(deps): bump cryptography from 44.0.1 to 45.0.7 in /tools/publish by @dependabot[bot] in #3235
  • build(deps): bump jeepney from 0.8.0 to 0.9.0 in /tools/publish by @dependabot[bot] in #3234
  • build(deps): bump keyring from 25.5.0 to 25.6.0 in /tools/publish by @dependabot[bot] in #3236
  • build(deps): bump importlib-metadata from 8.5.0 to 8.7.0 in /tools/publish by @dependabot[bot] in #3237
  • refactor(gazelle): report missing BUILD_WORKSPACE_DIRECTORY key more directly by @ctcjab in #3240
  • chore(deps): bump rules_cc to 0.1.5 by @aignas in #3238
  • fix(sphinxdocs): add retry logic when exit code 2 occurs by @rickeylev in #3241
  • fix(system_python): write import paths to generated file instead of using PYTHONPATH by @rickeylev in #3242
  • refactor(pypi): split out a hub_builder helper from the extension code by @aignas in #3243
  • chore: add GEMINI.md, have it load AGENTS.md by @rickeylev in #3246
  • docs: fix pr doc builds by removing external_version_warning plugin by @rickeylev in #3244
  • refactor: migrate tests to use hub_builder instead of full integration by @aignas in #3247
  • build(deps): bump zipp from 3.20.2 to 3.23.0 in /tools/publish by @dependabot[bot] in #3253
  • build(deps): bump more-itertools from 10.7.0 to 10.8.0 in /tools/publish by @dependabot[bot] in #3254
  • feat: allow registering arbitrary settings for py_binary transitions by @rickeylev in #3248
  • fix: ensure the stage1 bootstrap is executable by @EdSchouten in #3258
  • fix: don't call Args.add() with an integer by @EdSchouten in #3259
  • docs: update changelog for config_settings attribute by @rickeylev in #3257
  • chore: add agents guidance for creating bzl_library targets by @rickeylev in #3264
  • docs: improve whl_library documentation by @baxelrod-bdai in #3266
  • refactor: use common_labels.bzl for labels used across files by @rickeylev in #3263
  • fix(pypi): select the lowest available libc version by default by @aignas in #3255
  • tests: add non-blocking ci config for bazel rolling by @rickeylev in #3272
  • fix: venv site packages with pkgutil packages by @rickeylev in #3268
  • build(deps): bump pycparser from 2.22 to 2.23 in /tools/publish by @dependabot[bot] in #3271
  • build(deps): bump cffi from 1.17.1 to 2.0.0 in /tools/publish by @dependabot[bot] in #3270
  • build: remove no-op _native_rules_allowlist by @mai93 in #3275
  • build(deps): bump pkginfo from 1.10.0 to 1.12.1.2 in /tools/publish by @dependabot[bot] in #3229
  • tests: make py_cc_toolchain test of headers/includes work with Bazel 9 by @rickeylev in #3276
  • chore(docs): remove duplicate bzlmod guidance by @alexeagle in #3278
  • chore: remove non-toolchain runtime resolution logic. by @gregestren in #3280
  • feat(toolchains): ABI3 Python headers target by @nicholasjng in #3274
  • docs: move 1.6.3 related changelog by @aignas in #3284
  • refactor: read migrated native flags through a centralized accessor function by @gregestren in #3290
  • build(deps): bump docutils from 0.21.2 to 0.22.2 in /docs by @dependabot[bot] in #3287
  • build(deps): bump jaraco-functools from 4.1.0 to 4.3.0 in /tools/publish by @dependabot[bot] in #3288
  • docs: add example for a complex multi-platform pypi configuration by @rickeylev in #3292
  • feat(runfiles): support for --incompatible_compact_repo_mapping_manifest by @jklukas in #3277
  • chore: cleanup bazel flags related to bazel 6 or below by @aignas in #3282
  • refactor: rename symbols in re-exports by @aignas in #3300
  • chore: use python.defaults to set rules_python default python version by @rickeylev in #3301
  • docs: fix spelling of venvs_site_packages flag in changelog by @rickeylev in https://gi...
Read more

1.6.3

21 Sep 13:25

Choose a tag to compare

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 = "1.6.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")

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 = "2f5c284fbb4e86045c2632d3573fc006facbca5d1fa02976e89dc0cd5488b590", strip_prefix = "rules_python-1.6.3", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.3/rules_python-1.6.3.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") py_repositories()

Gazelle plugin

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 = "2f5c284fbb4e86045c2632d3573fc006facbca5d1fa02976e89dc0cd5488b590", strip_prefix = "rules_python-1.6.3/gazelle", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.3/rules_python-1.6.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: 1.6.2...1.6.3

1.6.1

08 Sep 12:58

Choose a tag to compare

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 = "1.6.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")

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 = "f2e80f97f9c0b82e2489e61e725df1e6bdaf16c4dacf5e26b95668787164baff", strip_prefix = "rules_python-1.6.1", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.1/rules_python-1.6.1.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") py_repositories()

Gazelle plugin

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 = "f2e80f97f9c0b82e2489e61e725df1e6bdaf16c4dacf5e26b95668787164baff", strip_prefix = "rules_python-1.6.1/gazelle", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.1/rules_python-1.6.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: 1.6.0...1.6.1

1.6.0

03 Sep 17:40

Choose a tag to compare

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 = "1.6.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 = "fa7dd2c6b7d63b3585028dd8a90a6cf9db83c33b250959c2ee7b583a6c130e12", strip_prefix = "rules_python-1.6.0", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.0/rules_python-1.6.0.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") py_repositories()

Gazelle plugin

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 = "fa7dd2c6b7d63b3585028dd8a90a6cf9db83c33b250959c2ee7b583a6c130e12", strip_prefix = "rules_python-1.6.0/gazelle", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.0/rules_python-1.6.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()

What's Changed

  • chore: Fixup some typos in BuildKite job names by @dougthor42 in #2977
  • refactor: Remove unused CC_TOOLCHAIN definition by @katre in #2981
  • Fix argument name typo by @keith in #2984
  • build(deps): bump certifi from 2025.1.31 to 2025.6.15 in /tools/publish by @dependabot[bot] in #2999
  • build(deps): bump certifi from 2025.1.31 to 2025.6.15 in /docs by @dependabot[bot] in #3000
  • build(deps): bump requests from 2.32.3 to 2.32.4 in /docs by @dependabot[bot] in #2965
  • fix: use platform_info.target_settings in toolchain aliases by @aignas in #3001
  • refactor(gazelle) Types for exposed members of python.ParserOutput are now all public by @yushan26 in #2959
  • feat(pypi): pip.defaults API for customizing pipstar 1/n by @aignas in #2987
  • feat(pypi): pip.defaults API for customizing repo selection 2/n by @aignas in #2988
  • fix(toolchains): use posix-compatible exec -a alternative by @rickeylev in #3010
  • build(deps): bump urllib3 from 2.4.0 to 2.5.0 in /tools/publish by @dependabot[bot] in #3008
  • feat: support arbitrary target_settings in our platforms 3/n by @aignas in #2990
  • docs: fix various typos and improve grammar by @rickeylev in #3015
  • feat(gazelle): For package mode, resolve dependencies when imports are relative to the package path by @yushan26 in #2865
  • fix: Fix bazel vendor support for requirements with environment markers by @armandomontanez in #2997
  • fix(pypi): namespace_pkgs should pass correct arguments by @aignas in #3026
  • fix: work around version parsing by only parsing if site-packages is enabled by @rickeylev in #3031
  • docs,tests: Clarify how py_wheel.strip_path_prefixes works; add test case by @dougthor42 in #3027
  • feat(gazelle): Add type-checking only dependencies to pyi_deps by @amartani in #3014
  • fix: delete BUILD et al files from pypi sourced dependencies by @rickeylev in #3029
  • fix(gazelle) Fix dependency added as both deps and pyi_deps by @amartani in #3036
  • fix(gazelle) Register pyi_deps as ResolveAttrs by @amartani in #3037
  • docs: Typo in gazelle/README.md by @jklukas in #3040
  • feat(gazelle) Remove entry point file requirements when generating rules by @yushan26 in #2998
  • fix: Don't let deprecated test targets get matched by '...' by @robinlinden in #3045
  • fix: add py.typed to runfiles py_wheel so it gets packaged by @aaronsky in #3041
  • docs: Add note about Python 3.9 to CHANGELOG.md by @thirtyseven in #3052
  • fix: Updating Python toolchains to patch CVE-2025-47273 by @aaronmaxlevy in #3053
  • docs: doc expectations of ai-assisted contributions by @rickeylev in #3051
  • fix(local-toolchains): don't watch non-existent include directory by @rickeylev in #3048
  • build(deps): bump urllib3 from 2.4.0 to 2.5.0 in /docs by @dependabot[bot] in #3042
  • fix(pypi): only generate namespace package shims if implicit namespaces are disabled by @rickeylev in #3059
  • feat: Add windows arm64 python toolchains by @AustinSchuh in #3062
  • refactor(toolchains): better sha256 printing helper by @aignas in #3028
  • refactor(pypi): move the platform config to MODULE.bazel by @aignas in #3064
  • fix(pypi): correctly handle custom names in pipstar platforms by @aignas in #3054
  • tests(pypi): add tests for namespace shims generation by @rickeylev in #3066
  • build(deps): bump pygments from 2.19.1 to 2.19.2 in /docs by @dependabot[bot] in #3019
  • build(deps): bump charset-normalizer from 3.4.1 to 3.4.2 in /docs by @dependabot[bot] in #3018
  • fix: parsing local version with digit followed by non-digits by @rickeylev in #3032
  • feat(pypi): generate filegroup with all extracted wheel files by @rickeylev in #3011
  • docs: add whl_from_dir to dev guide docs by @rickeylev in #3067
  • fix(toolchains): fix the URLs and sha256 values by @aignas in #3070
  • chore: Switch back to smacker/go-tree-sitter by @dougthor42 in #3069
  • build(deps): bump charset-normalizer from 3.4.1 to 3.4.2 in /tools/publish by @dependabot[bot] in #3020
  • build(deps): bump pygments from 2.18.0 to 2.19.2 in /tools/publish by @dependabot[bot] in #3021
  • ci: use Ubuntu 22.04 by @aignas in #3083
  • fix(gazelle) Update gazelle to properly process multi-line python imports by @yushan26 in #3077
  • feat(gazelle): Gazelle plugin generates py_proto_library by @shaldengeki in #3057
  • feat(gazelle): Add include_pytest_conftest annotation by @dougthor42 in #3080
  • docs: tell how to emulate dependency groups with pip-compile by @rickeylev in #3089
  • chore: update python toolchains by @aignas in #3074
  • feat: replace /bin/bash with /usr/bin/env bash by @fionera in #3087
  • build(deps): bump certifi from 2025.6.15 to 2025.7.14 in /docs by @dependabot[bot] in #3092
  • build(deps): bump certifi from 2025.6.15 to 2025.7.14 in /tools/publish by @dependabot[bot] in #3095
  • fix: support debian multiarch with local toolchains by @rickeylev in #3100
  • refactor(gazelle_manifest): print the wrong hash when encountered by @alexeagle in #3103
  • feat(gazelle): python_proto_naming_convention directive controls py_proto_library naming by @shaldengeki in #3093
  • fix(pypi): expose pypi pa...
Read more

1.5.4

28 Aug 05:33
019fb4b

Choose a tag to compare

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 = "1.5.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")

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 = "13671d304cfe43350302213a60d93a5fc0b763b0a6de17397e3e239253b61b73", strip_prefix = "rules_python-1.5.4", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.4/rules_python-1.5.4.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") py_repositories()

Gazelle plugin

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 = "13671d304cfe43350302213a60d93a5fc0b763b0a6de17397e3e239253b61b73", strip_prefix = "rules_python-1.5.4/gazelle", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.4/rules_python-1.5.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()

What's Changed

Full Changelog: 1.5.3...1.5.4

1.6.0-rc0

24 Aug 16:56
24146a4

Choose a tag to compare

1.6.0-rc0 Pre-release
Pre-release

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 = "1.6.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")

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 = "3664a03376fc2441e2dec357000b3a80119e2ea062ea1be41418daeb91451055", strip_prefix = "rules_python-1.6.0-rc0", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.0-rc0/rules_python-1.6.0-rc0.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") py_repositories()

Gazelle plugin

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 = "3664a03376fc2441e2dec357000b3a80119e2ea062ea1be41418daeb91451055", strip_prefix = "rules_python-1.6.0-rc0/gazelle", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.0-rc0/rules_python-1.6.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()

What's Changed

  • chore: Fixup some typos in BuildKite job names by @dougthor42 in #2977
  • refactor: Remove unused CC_TOOLCHAIN definition by @katre in #2981
  • Fix argument name typo by @keith in #2984
  • build(deps): bump certifi from 2025.1.31 to 2025.6.15 in /tools/publish by @dependabot[bot] in #2999
  • build(deps): bump certifi from 2025.1.31 to 2025.6.15 in /docs by @dependabot[bot] in #3000
  • build(deps): bump requests from 2.32.3 to 2.32.4 in /docs by @dependabot[bot] in #2965
  • fix: use platform_info.target_settings in toolchain aliases by @aignas in #3001
  • refactor(gazelle) Types for exposed members of python.ParserOutput are now all public by @yushan26 in #2959
  • feat(pypi): pip.defaults API for customizing pipstar 1/n by @aignas in #2987
  • feat(pypi): pip.defaults API for customizing repo selection 2/n by @aignas in #2988
  • fix(toolchains): use posix-compatible exec -a alternative by @rickeylev in #3010
  • build(deps): bump urllib3 from 2.4.0 to 2.5.0 in /tools/publish by @dependabot[bot] in #3008
  • feat: support arbitrary target_settings in our platforms 3/n by @aignas in #2990
  • docs: fix various typos and improve grammar by @rickeylev in #3015
  • feat(gazelle): For package mode, resolve dependencies when imports are relative to the package path by @yushan26 in #2865
  • fix: Fix bazel vendor support for requirements with environment markers by @armandomontanez in #2997
  • fix(pypi): namespace_pkgs should pass correct arguments by @aignas in #3026
  • fix: work around version parsing by only parsing if site-packages is enabled by @rickeylev in #3031
  • docs,tests: Clarify how py_wheel.strip_path_prefixes works; add test case by @dougthor42 in #3027
  • feat(gazelle): Add type-checking only dependencies to pyi_deps by @amartani in #3014
  • fix: delete BUILD et al files from pypi sourced dependencies by @rickeylev in #3029
  • fix(gazelle) Fix dependency added as both deps and pyi_deps by @amartani in #3036
  • fix(gazelle) Register pyi_deps as ResolveAttrs by @amartani in #3037
  • docs: Typo in gazelle/README.md by @jklukas in #3040
  • feat(gazelle) Remove entry point file requirements when generating rules by @yushan26 in #2998
  • fix: Don't let deprecated test targets get matched by '...' by @robinlinden in #3045
  • fix: add py.typed to runfiles py_wheel so it gets packaged by @aaronsky in #3041
  • docs: Add note about Python 3.9 to CHANGELOG.md by @thirtyseven in #3052
  • fix: Updating Python toolchains to patch CVE-2025-47273 by @aaronmaxlevy in #3053
  • docs: doc expectations of ai-assisted contributions by @rickeylev in #3051
  • fix(local-toolchains): don't watch non-existent include directory by @rickeylev in #3048
  • build(deps): bump urllib3 from 2.4.0 to 2.5.0 in /docs by @dependabot[bot] in #3042
  • fix(pypi): only generate namespace package shims if implicit namespaces are disabled by @rickeylev in #3059
  • feat: Add windows arm64 python toolchains by @AustinSchuh in #3062
  • refactor(toolchains): better sha256 printing helper by @aignas in #3028
  • refactor(pypi): move the platform config to MODULE.bazel by @aignas in #3064
  • fix(pypi): correctly handle custom names in pipstar platforms by @aignas in #3054
  • tests(pypi): add tests for namespace shims generation by @rickeylev in #3066
  • build(deps): bump pygments from 2.19.1 to 2.19.2 in /docs by @dependabot[bot] in #3019
  • build(deps): bump charset-normalizer from 3.4.1 to 3.4.2 in /docs by @dependabot[bot] in #3018
  • fix: parsing local version with digit followed by non-digits by @rickeylev in #3032
  • feat(pypi): generate filegroup with all extracted wheel files by @rickeylev in #3011
  • docs: add whl_from_dir to dev guide docs by @rickeylev in #3067
  • fix(toolchains): fix the URLs and sha256 values by @aignas in #3070
  • chore: Switch back to smacker/go-tree-sitter by @dougthor42 in #3069
  • build(deps): bump charset-normalizer from 3.4.1 to 3.4.2 in /tools/publish by @dependabot[bot] in #3020
  • build(deps): bump pygments from 2.18.0 to 2.19.2 in /tools/publish by @dependabot[bot] in #3021
  • ci: use Ubuntu 22.04 by @aignas in #3083
  • fix(gazelle) Update gazelle to properly process multi-line python imports by @yushan26 in #3077
  • feat(gazelle): Gazelle plugin generates py_proto_library by @shaldengeki in #3057
  • feat(gazelle): Add include_pytest_conftest annotation by @dougthor42 in #3080
  • docs: tell how to emulate dependency groups with pip-compile by @rickeylev in #3089
  • chore: update python toolchains by @aignas in #3074
  • feat: replace /bin/bash with /usr/bin/env bash by @fionera in #3087
  • build(deps): bump certifi from 2025.6.15 to 2025.7.14 in /docs by @dependabot[bot] in #3092
  • build(deps): bump certifi from 2025.6.15 to 2025.7.14 in /tools/publish by @dependabot[bot] in #3095
  • fix: support debian multiarch with local toolchains by @rickeylev in #3100
  • refactor(gazelle_manifest): print the wrong hash when encountered by @alexeagle in #3103
  • feat(gazelle): python_proto_naming_convention directive controls py_proto_library naming by @shaldengeki in #3093
  • fix(pypi): expose pypi packages only common to all python versions by @dotoleeoak in https://github.com/bazel-contrib...
Read more

1.4.2

18 Aug 15:40
998d2bc

Choose a tag to compare

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 = "1.4.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")

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 = "daf1c27517e8526c212195345b4f6f02dd8cad69aa099d3bdb11868458211829", strip_prefix = "rules_python-1.4.2", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.2/rules_python-1.4.2.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") py_repositories()

Gazelle plugin

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 = "daf1c27517e8526c212195345b4f6f02dd8cad69aa099d3bdb11868458211829", strip_prefix = "rules_python-1.4.2/gazelle", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.2/rules_python-1.4.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()

What's Changed

Full Changelog: 1.4.1...1.4.2

1.5.3

11 Aug 23:46

Choose a tag to compare

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 = "1.5.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")

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 = "0a1cefefb4a7b550fb0b43f54df67d6da95b7ba352637669e46c987f69986f6a", strip_prefix = "rules_python-1.5.3", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.3/rules_python-1.5.3.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") py_repositories()

Gazelle plugin

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 = "0a1cefefb4a7b550fb0b43f54df67d6da95b7ba352637669e46c987f69986f6a", strip_prefix = "rules_python-1.5.3/gazelle", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.3/rules_python-1.5.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: 1.5.2...1.5.3

1.5.2

11 Aug 08:02

Choose a tag to compare

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 = "1.5.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")

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 = "0e68f851a6fcf317eeab5f6dc79803cb183d30c0c65fb52e2c4b731d13b73349", strip_prefix = "rules_python-1.5.2", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.2/rules_python-1.5.2.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") py_repositories()

Gazelle plugin

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 = "0e68f851a6fcf317eeab5f6dc79803cb183d30c0c65fb52e2c4b731d13b73349", strip_prefix = "rules_python-1.5.2/gazelle", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.2/rules_python-1.5.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: 1.5.1...1.5.2

1.5.1

06 Jul 03:27

Choose a tag to compare

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 = "1.5.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")

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 = "fa532d635f29c038a64c8062724af700c30cf6b31174dd4fac120bc561a1a560", strip_prefix = "rules_python-1.5.1", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.1/rules_python-1.5.1.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") py_repositories()

Gazelle plugin

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 = "fa532d635f29c038a64c8062724af700c30cf6b31174dd4fac120bc561a1a560", strip_prefix = "rules_python-1.5.1/gazelle", url = "https://github.com/bazel-contrib/rules_python/releases/download/1.5.1/rules_python-1.5.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: 1.5.0...1.5.1