Skip to content

Releases: bazel-contrib/rules_python

2.3.1

Choose a tag to compare

@github-actions github-actions released this 14 Aug 19:10

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

For the user-facing changelog see here

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "2.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")

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 = "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()

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 = "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

2.3.0

Choose a tag to compare

@github-actions github-actions released this 14 Aug 05:16

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

For the user-facing changelog see here

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "2.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")

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 = "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()

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 = "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()

What's Changed

  • chore: generate release changelog from news entries by @rickeylev in #3827
  • fix(coverage): skip lcov report when no data was collected by @maxbirkner in #3832
  • fix(pypi): respect empty envsubst expansion in experimental_index_url by @kriscfoster in #3828
  • refactor(pypi): don't use Python to patch wheels by @aignas in #3808
  • feat(py_info): expose VenvSymlinkEntry and VenvSymlinkKind as public APIs by @rickeylev in #3835
  • doc: merge news into generated changelog by @rickeylev in #3836
  • ci: enable bazel-diff by @rickeylev in #3838
  • fix: run bazel-diff in cquery mode under bazelci by @rickeylev in #3839
  • ci: disable bazel-diff due to platform compatibility conflicts by @rickeylev in #3840
  • chore: warn on implicit init.py creation by @rickeylev in #3841
  • fix(bootstrap): use retry loop for win32 version lookup in site init template by @rickeylev in #3842
  • fix(rules): disambiguate slash target venv outputs by @gleyba in #3845
  • chore: automate releases by @rickeylev in #3833
  • build(deps): bump actions/checkout from 6 to 7 by @dependabot[bot] in #3843
  • chore: remove accidentally committed release automation plan by @rickeylev in #3846
  • feat: unified pypi hub repository by @rickeylev in #3837
  • feat(pypi): support importing uv.lock file by @aignas in #3785
  • chore: add agent rule to base new branches on upstream/main by @rickeylev in #3849
  • build(ci): consolidate PR guardrails and block draft files by @rickeylev in #3859
  • refactor: use gazelle for bzl_library management by @rickeylev in #3852
  • fix(ci): use --repo flag in gh pr diff to avoid checkout by @rickeylev in #3861
  • feat: stop using chmod on Bazel 8.6+ by @aignas in #3855
  • ci: make pr-metadata-check run on PR body edit by @rickeylev in #3862
  • chore(pypi): cleanup unused code by @aignas in #3864
  • chore(release): correct version tagging and improve promotion flow by @rickeylev in #3866
  • chore(release): add dry-run to release tool prepare command by @rickeylev in #3869
  • chore(release): reuse existing PRs and avoid early exit in prep tool by @rickeylev in #3870
  • chore(release): use force push and clean up git helpers in prep tool by @rickeylev in #3873
  • Prepare release v2.2.0 by @github-actions[bot] in #3874
  • chore(release): fix release label consistency in workflows and templates by @rickeylev in #3876
  • fix: avoid stage1 bootstrap stdlib shadowing by @gleyba in #3854
  • build(deps): bump bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml from 1.1.0 to 1.4.1 by @dependabot[bot] in #3822
  • chore(release): support custom remote in create-release-branch and refactor by @rickeylev in #3877
  • chore(release): refactor create-rc and handle existing remote release branch by @rickeylev in #3879
  • chore(release): various fixes to release tool and workflows by @rickeylev in #3880
  • feat(pypi): add pip.dep to declare abstract pypi dependencies by @rickeylev in #3850
  • chore(release): refactor process-backports and various release tool fixes by @rickeylev in #3881
  • chore(release): factor code, make testable, clarify workflow names by @rickeylev in #3882
  • chore(release): pass missing --remote argument to release workflows by @rickeylev in #3883
  • chore(release): enable execution in process-backports workflow by @rickeylev in #3884
  • chore(release): release automation fixes and refactoring by @rickeylev in #3885
  • fix: use locale-neutral Windows ACL for build data by @alex-the-third in #3887
  • feat(py_test): add opt-in safeguard against accidental no-op tests by @thirtyseven in #3825
  • feat: enable pyproject.toml as single source of truth for Python version by @golithe in #3514
  • Fix release tool links and improve workflow robustness by @rickeylev in #3888
  • build(release): support triggering release workflows via comments by @rickeylev in #3889
  • chore(release): allow comments to trigger actions, update releasing docs by @rickeylev in #3891
  • chore(release): grant write permissions to on_issue_comment workflow by @rickeylev in #3892
  • chore(release): add pull-requests: write permission to on_issue_comment workflow by @rickeylev in #3893
  • chore(release): auto-add RC tasks to checklist in create-rc by @rickeylev in #3894
  • chore(release): secure workflows against shell injection by @rickeylev in #3895
  • fix: run executable zip action with execution Python to better support windows building by @dzbarsky in #3890
  • chore(release): process backports as part of creating RC by @rickeylev in #3896
  • chore(release): automate backport processing on PR merge, and have add-backports accept hashtag and url refs by @rickeylev in #3897
  • chore(release): fix promote_rc arguments and align comments by @rickeylev in #3898
  • chore(release): fix promote-rc command and update workflow args by @rickeylev in #3899
  • chore(release): make promote_rc workflow call publish_release workflow to finish publishing by @rickeylev in #3900
  • docs: sync 2.2 changelog and news to main by @rickeylev in #3901
  • chore(release): sync changelog and version markers to main during backports by @rickeylev in #3903
  • chore: remove stale process-backports-before-rc news file by @rickeylev in https://github.com/bazel-contrib/...
Read more

2.3.0-rc2

2.3.0-rc2 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 13 Aug 17:12

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

For the user-facing changelog see here

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "2.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")

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 = "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()

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 = "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

2.3.0-rc1

2.3.0-rc1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 12 Aug 06:53

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

For the user-facing changelog see here

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "2.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")

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 = "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()

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 = "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

2.3.0-rc0

2.3.0-rc0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 08 Aug 20:35
d8bb5eb

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

For the user-facing changelog see here

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "2.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")

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 = "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()

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 = "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()

What's Changed

  • chore: generate release changelog from news entries by @rickeylev in #3827
  • fix(coverage): skip lcov report when no data was collected by @maxbirkner in #3832
  • fix(pypi): respect empty envsubst expansion in experimental_index_url by @kriscfoster in #3828
  • refactor(pypi): don't use Python to patch wheels by @aignas in #3808
  • feat(py_info): expose VenvSymlinkEntry and VenvSymlinkKind as public APIs by @rickeylev in #3835
  • doc: merge news into generated changelog by @rickeylev in #3836
  • ci: enable bazel-diff by @rickeylev in #3838
  • fix: run bazel-diff in cquery mode under bazelci by @rickeylev in #3839
  • ci: disable bazel-diff due to platform compatibility conflicts by @rickeylev in #3840
  • chore: warn on implicit init.py creation by @rickeylev in #3841
  • fix(bootstrap): use retry loop for win32 version lookup in site init template by @rickeylev in #3842
  • fix(rules): disambiguate slash target venv outputs by @gleyba in #3845
  • chore: automate releases by @rickeylev in #3833
  • build(deps): bump actions/checkout from 6 to 7 by @dependabot[bot] in #3843
  • chore: remove accidentally committed release automation plan by @rickeylev in #3846
  • feat: unified pypi hub repository by @rickeylev in #3837
  • feat(pypi): support importing uv.lock file by @aignas in #3785
  • chore: add agent rule to base new branches on upstream/main by @rickeylev in #3849
  • build(ci): consolidate PR guardrails and block draft files by @rickeylev in #3859
  • refactor: use gazelle for bzl_library management by @rickeylev in #3852
  • fix(ci): use --repo flag in gh pr diff to avoid checkout by @rickeylev in #3861
  • feat: stop using chmod on Bazel 8.6+ by @aignas in #3855
  • ci: make pr-metadata-check run on PR body edit by @rickeylev in #3862
  • chore(pypi): cleanup unused code by @aignas in #3864
  • chore(release): correct version tagging and improve promotion flow by @rickeylev in #3866
  • chore(release): add dry-run to release tool prepare command by @rickeylev in #3869
  • chore(release): reuse existing PRs and avoid early exit in prep tool by @rickeylev in #3870
  • chore(release): use force push and clean up git helpers in prep tool by @rickeylev in #3873
  • Prepare release v2.2.0 by @github-actions[bot] in #3874
  • chore(release): fix release label consistency in workflows and templates by @rickeylev in #3876
  • fix: avoid stage1 bootstrap stdlib shadowing by @gleyba in #3854
  • build(deps): bump bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml from 1.1.0 to 1.4.1 by @dependabot[bot] in #3822
  • chore(release): support custom remote in create-release-branch and refactor by @rickeylev in #3877
  • chore(release): refactor create-rc and handle existing remote release branch by @rickeylev in #3879
  • chore(release): various fixes to release tool and workflows by @rickeylev in #3880
  • feat(pypi): add pip.dep to declare abstract pypi dependencies by @rickeylev in #3850
  • chore(release): refactor process-backports and various release tool fixes by @rickeylev in #3881
  • chore(release): factor code, make testable, clarify workflow names by @rickeylev in #3882
  • chore(release): pass missing --remote argument to release workflows by @rickeylev in #3883
  • chore(release): enable execution in process-backports workflow by @rickeylev in #3884
  • chore(release): release automation fixes and refactoring by @rickeylev in #3885
  • fix: use locale-neutral Windows ACL for build data by @alex-the-third in #3887
  • feat(py_test): add opt-in safeguard against accidental no-op tests by @thirtyseven in #3825
  • feat: enable pyproject.toml as single source of truth for Python version by @golithe in #3514
  • Fix release tool links and improve workflow robustness by @rickeylev in #3888
  • build(release): support triggering release workflows via comments by @rickeylev in #3889
  • chore(release): allow comments to trigger actions, update releasing docs by @rickeylev in #3891
  • chore(release): grant write permissions to on_issue_comment workflow by @rickeylev in #3892
  • chore(release): add pull-requests: write permission to on_issue_comment workflow by @rickeylev in #3893
  • chore(release): auto-add RC tasks to checklist in create-rc by @rickeylev in #3894
  • chore(release): secure workflows against shell injection by @rickeylev in #3895
  • fix: run executable zip action with execution Python to better support windows building by @dzbarsky in #3890
  • chore(release): process backports as part of creating RC by @rickeylev in #3896
  • chore(release): automate backport processing on PR merge, and have add-backports accept hashtag and url refs by @rickeylev in #3897
  • chore(release): fix promote_rc arguments and align comments by @rickeylev in #3898
  • chore(release): fix promote-rc command and update workflow args by @rickeylev in #3899
  • chore(release): make promote_rc workflow call publish_release workflow to finish publishing by @rickeylev in #3900
  • docs: sync 2.2 changelog and news to main by @rickeylev in #3901
  • chore(release): sync changelog and version markers to main during backports by @rickeylev in #3903
  • chore: remove stale process-backports-before-rc news file by @rickeylev in h...
Read more

1.9.2

Choose a tag to compare

@aignas aignas released this 30 Jul 02:36
99858c5

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.9.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 = "98880e2942e66fbe23202bd4174c089a54a203c32fc1cbc1c6c86df9f97ad7e3",
    strip_prefix = "rules_python-1.9.2",
    url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.2/rules_python-1.9.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 = "98880e2942e66fbe23202bd4174c089a54a203c32fc1cbc1c6c86df9f97ad7e3",
    strip_prefix = "rules_python-1.9.2/gazelle",
    url = "https://github.com/bazel-contrib/rules_python/releases/download/1.9.2/rules_python-1.9.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

  • fix: make executable implicit defaults public so other modules can use rule builders (#3919) by @13steinj in #3970

Full Changelog: 1.9.1...1.9.2

2.2.0

Choose a tag to compare

@github-actions github-actions released this 04 Jul 06:35

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

For the user-facing changelog see here

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "2.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")

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 = "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()

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 = "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()

What's Changed

  • chore: generate release changelog from news entries by @rickeylev in #3827
  • fix(coverage): skip lcov report when no data was collected by @maxbirkner in #3832
  • fix(pypi): respect empty envsubst expansion in experimental_index_url by @kriscfoster in #3828
  • refactor(pypi): don't use Python to patch wheels by @aignas in #3808
  • feat(py_info): expose VenvSymlinkEntry and VenvSymlinkKind as public APIs by @rickeylev in #3835
  • doc: merge news into generated changelog by @rickeylev in #3836
  • ci: enable bazel-diff by @rickeylev in #3838
  • fix: run bazel-diff in cquery mode under bazelci by @rickeylev in #3839
  • ci: disable bazel-diff due to platform compatibility conflicts by @rickeylev in #3840
  • chore: warn on implicit init.py creation by @rickeylev in #3841
  • fix(bootstrap): use retry loop for win32 version lookup in site init template by @rickeylev in #3842
  • fix(rules): disambiguate slash target venv outputs by @gleyba in #3845
  • chore: automate releases by @rickeylev in #3833
  • build(deps): bump actions/checkout from 6 to 7 by @dependabot[bot] in #3843
  • chore: remove accidentally committed release automation plan by @rickeylev in #3846
  • feat: unified pypi hub repository by @rickeylev in #3837
  • feat(pypi): support importing uv.lock file by @aignas in #3785
  • chore: add agent rule to base new branches on upstream/main by @rickeylev in #3849
  • build(ci): consolidate PR guardrails and block draft files by @rickeylev in #3859
  • refactor: use gazelle for bzl_library management by @rickeylev in #3852
  • fix(ci): use --repo flag in gh pr diff to avoid checkout by @rickeylev in #3861
  • feat: stop using chmod on Bazel 8.6+ by @aignas in #3855
  • ci: make pr-metadata-check run on PR body edit by @rickeylev in #3862
  • chore(pypi): cleanup unused code by @aignas in #3864
  • chore(release): correct version tagging and improve promotion flow by @rickeylev in #3866
  • chore(release): add dry-run to release tool prepare command by @rickeylev in #3869
  • chore(release): reuse existing PRs and avoid early exit in prep tool by @rickeylev in #3870
  • chore(release): use force push and clean up git helpers in prep tool by @rickeylev in #3873
  • Prepare release v2.2.0 by @github-actions[bot] in #3874

New Contributors

Full Changelog: 2.1.0...2.2.0

2.2.0-rc4

2.2.0-rc4 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 03 Jul 15:02

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

For the user-facing changelog see here

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "2.2.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")

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 = "86c8f79576ab59cbe2fabef03f9555a57b27d402cab0dac2a54cec25c459e6a7",
    strip_prefix = "rules_python-2.2.0-rc4",
    url = "https://github.com/bazel-contrib/rules_python/releases/download/2.2.0-rc4/rules_python-2.2.0-rc4.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 = "86c8f79576ab59cbe2fabef03f9555a57b27d402cab0dac2a54cec25c459e6a7",
    strip_prefix = "rules_python-2.2.0-rc4/gazelle",
    url = "https://github.com/bazel-contrib/rules_python/releases/download/2.2.0-rc4/rules_python-2.2.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: 2.2.0-rc3...2.2.0-rc4

2.2.0-rc3

2.2.0-rc3 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 03 Jul 08:17

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

For the user-facing changelog see here

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "2.2.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")

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 = "5b5a9005918127d2133cc51d83f78f7694093a39408f3971651c75f29d9a8209",
    strip_prefix = "rules_python-2.2.0-rc3",
    url = "https://github.com/bazel-contrib/rules_python/releases/download/2.2.0-rc3/rules_python-2.2.0-rc3.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 = "5b5a9005918127d2133cc51d83f78f7694093a39408f3971651c75f29d9a8209",
    strip_prefix = "rules_python-2.2.0-rc3/gazelle",
    url = "https://github.com/bazel-contrib/rules_python/releases/download/2.2.0-rc3/rules_python-2.2.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.2.0-rc2...2.2.0-rc3

2.2.0-rc2

2.2.0-rc2 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 02 Jul 17:53

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

For the user-facing changelog see here

Using Bzlmod

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "2.2.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")

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 = "1ffaf53f81674e0b9da64dc644e9bd6c7038fe1bc2779e5af9063a9669c4c8e5",
    strip_prefix = "rules_python-2.2.0-rc2",
    url = "https://github.com/bazel-contrib/rules_python/releases/download/2.2.0-rc2/rules_python-2.2.0-rc2.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 = "1ffaf53f81674e0b9da64dc644e9bd6c7038fe1bc2779e5af9063a9669c4c8e5",
    strip_prefix = "rules_python-2.2.0-rc2/gazelle",
    url = "https://github.com/bazel-contrib/rules_python/releases/download/2.2.0-rc2/rules_python-2.2.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.2.0-rc1...2.2.0-rc2