Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency rules_python to v0.25.0 #153

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 20, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
rules_python http_archive minor 0.20.0 -> 0.25.0

Release Notes

bazelbuild/rules_python (rules_python)

v0.25.0

Compare Source

Changed
  • Python version patch level bumps:
    • 3.9.16 -> 3.9.17
    • 3.10.9 -> 3.10.12
    • 3.11.1 -> 3.11.4
  • (bzlmod) pip.parse can no longer automatically use the default
    Python version; this was an unreliable and unsafe behavior. The
    python_version arg must always be explicitly specified.
Fixed
  • (docs) Update docs to use correct bzlmod APIs and clarify how and when to use
    various APIs.
  • (multi-version) The main arg is now correctly computed and usually optional.
  • (bzlmod) pip.parse no longer requires a call for whatever the configured
    default Python version is.
Added
  • Created a changelog.
  • (gazelle) Stop generating unnecessary imports.
  • (toolchains) s390x supported for Python 3.9.17, 3.10.12, and 3.11.4.

v0.24.0

Compare Source

Changed
  • BREAKING (gazelle) Gazelle 0.30.0 or higher is required
  • (bzlmod) @python_aliases renamed to `@python_versions
  • (bzlmod) pip.parse arg name renamed to hub_name
  • (bzlmod) pip.parse arg incompatible_generate_aliases removed and always
    true.
Fixed
  • (bzlmod) Fixing Windows Python Interpreter symlink issues
  • (py_wheel) Allow twine tags and args
  • (toolchain, bzlmod) Restrict coverage tool visibility under bzlmod
  • (pip) Ignore temporary pyc.NNN files in wheels
  • (pip) Add format() calls to glob_exclude templates
  • plugin_output in py_proto_library rule
Added
  • Using Gazelle's lifecycle manager to manage external processes
  • (bzlmod) pip.parse can be called multiple times with different Python
    versions
  • (bzlmod) Allow bzlmod pip.parse to reference the default python toolchain and interpreter
  • (bzlmod) Implementing wheel annotations via whl_mods
  • (gazelle) support multiple requirements files in manifest generation
  • (py_wheel) Support for specifying Description-Content-Type and Summary in METADATA
  • (py_wheel) Support for specifying Project-URL
  • (compile_pip_requirements) Added generate_hashes arg (default True) to
    control generating hashes
  • (pip) Create all_data_requirements alias
  • Expose Python C headers through the toolchain.

v0.23.1

Compare Source

Using Bzlmod with Bazel 6

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "0.23.1")

pip = use_extension("@​rules_python//python:extensions.bzl", "pip")

pip.parse(
    name = "pip",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")

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 = "84aec9e21cc56fbc7f1335035a71c850d1b9b5cc6ff497306f84cced9a769841",
    strip_prefix = "rules_python-0.23.1",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.23.1/rules_python-0.23.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 = "84aec9e21cc56fbc7f1335035a71c850d1b9b5cc6ff497306f84cced9a769841",
    strip_prefix = "rules_python-0.23.1/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.23.1/rules_python-0.23.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()

What's Changed

Full Changelog: bazelbuild/rules_python@0.23.0...0.23.1

v0.23.0

Compare Source

Using Bzlmod with Bazel 6

NOTE: bzlmod support is still experimental; apis are still subject to change

This release introduces two notable changes to bzlmod support:

  • A default toolchain is automatically registered for you. You no longer need to call register_toolchains() yourself. Depending
    on rules_python through bazel_dep is sufficient. Note, however, the Python version used for this default toolchain will change
    frequently/unexpectedly to track the a recent Python version.
  • The name arg of python.toolchain has been removed. The toolchain repo name format is python_X_Y e.g. python_3_11.

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "0.23.0")

pip = use_extension("@​rules_python//python:extensions.bzl", "pip")

pip.parse(
    name = "pip",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")

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 = "8272287b125a23bfc79650ecbbc045ebcaee4d632338b1a50aad34357bcbadce",
    strip_prefix = "rules_python-0.23.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.23.0/rules_python-0.23.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 = "8272287b125a23bfc79650ecbbc045ebcaee4d632338b1a50aad34357bcbadce",
    strip_prefix = "rules_python-0.23.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.23.0/rules_python-0.23.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

New Contributors

Full Changelog: bazelbuild/rules_python@0.22.0...0.23.0

v0.22.0

Compare Source

Notable and Breaking Changes

Bzlmod extension paths have changed

As part of fixing some fundamental issues with the bzlmod support, we had to change the path to our extensions. Instead of all extensions being in a single extensions.bzl file, each extension is in its own file. Users must update the file path in their use_repo() statements as follows:

  • use_extension("@​rules_python//python:extensions.bzl", "python") -> use_extension("@​rules_python//python/extensions:python.bzl", "python")
  • use_extension("@​rules_python//python:extensions.bzl", "pip") -> use_extension("@​rules_python//python/extensions:pip.bzl", "pip")

The following sed commands should approximate the necessary changes:

sed 'sXuse_extension("@​rules_python//python:extensions.bzl", "python")Xuse_extension("@​rules_python//python/extensions:python.bzl", "python")X'`
sed 'sXuse_extension("@​rules_python//python:extensions.bzl", "pip")Xuse_extension("@​rules_python//python/extensions:pip.bzl", "pip")X'`

See examples/bzlmod_build_file_generation/MODULE.bazel for an example of the new paths.

Lockfile output churn

The output of lockfiles has slightly changed. Though functionally the same, their integrity hashes will change.


Using Bzlmod with Bazel 6

NOTE: Bzlmod support is still in beta.

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "0.22.0")

pip = use_extension("@​rules_python//python/extensions:pip.bzl", "pip")

pip.parse(
    name = "pip",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")

### (Optional) Register a specific python toolchain instead of using the host version
python = use_extension("@​rules_python//python/extensions:python.bzl", "python")

python.toolchain(
    name = "python3_9",
    python_version = "3.9",
)

use_repo(python, "python3_9_toolchains")

register_toolchains(
    "@​python3_9_toolchains//:all",
)

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 = "863ba0fa944319f7e3d695711427d9ad80ba92c6edd0b7c7443b84e904689539",
    strip_prefix = "rules_python-0.22.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.22.0/rules_python-0.22.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 = "863ba0fa944319f7e3d695711427d9ad80ba92c6edd0b7c7443b84e904689539",
    strip_prefix = "rules_python-0.22.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.22.0/rules_python-0.22.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

New Contributors

Full Changelog: bazelbuild/rules_python@0.21.0...0.22.0

v0.21.0

Compare Source

Using Bzlmod with Bazel 6

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "0.21.0")

pip = use_extension("@​rules_python//python:extensions.bzl", "pip")

pip.parse(
    name = "pip",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")

### (Optional) Register a specific python toolchain instead of using the host version
python = use_extension("@​rules_python//python:extensions.bzl", "python")

python.toolchain(
    name = "python3_9",
    python_version = "3.9",
)

use_repo(python, "python3_9_toolchains")

register_toolchains(
    "@​python3_9_toolchains//:all",
)

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 = "94750828b18044533e98a129003b6a68001204038dc4749f40b195b24c38f49f",
    strip_prefix = "rules_python-0.21.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.21.0/rules_python-0.21.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 = "94750828b18044533e98a129003b6a68001204038dc4749f40b195b24c38f49f",
    strip_prefix = "rules_python-0.21.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.21.0/rules_python-0.21.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

New Contributors

Full Changelog: bazelbuild/rules_python@0.20.0...0.21.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from c1e11b0 to 9df7017 Compare May 4, 2023 16:18
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.21.0 chore(deps): update dependency rules_python to v0.22.0 May 25, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from 9df7017 to b0bdce5 Compare May 25, 2023 22:58
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from b0bdce5 to fbc09ed Compare June 2, 2023 18:17
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.22.0 chore(deps): update dependency rules_python to v0.23.0 Jun 12, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from fbc09ed to b1f4e17 Compare June 12, 2023 19:31
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.23.0 chore(deps): update dependency rules_python to v0.23.1 Jun 13, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 2 times, most recently from 25fc810 to e725fbe Compare June 18, 2023 09:51
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.23.1 chore(deps): update dependency rules_python Jul 11, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from e725fbe to 6add467 Compare July 11, 2023 22:31
@renovate renovate bot changed the title chore(deps): update dependency rules_python chore(deps): update dependency rules_python to v0.24.0 Jul 12, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from 6add467 to b7ac003 Compare July 12, 2023 02:15
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 3 times, most recently from 05f9d1a to e541381 Compare July 25, 2023 21:58
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from e541381 to 77f7b64 Compare July 31, 2023 22:15
Copy link
Member

@cgrindel cgrindel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skip update

@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 4 times, most recently from 08f80d1 to 0bd15e2 Compare August 1, 2023 12:43
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 6 times, most recently from 395294b to 134b48b Compare August 7, 2023 19:42
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 2 times, most recently from a4c0bbf to b62c056 Compare August 8, 2023 19:00
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 2 times, most recently from 098d279 to ec5836b Compare August 16, 2023 17:39
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.24.0 chore(deps): update dependency rules_python to v0.25.0 Aug 22, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 4 times, most recently from 65db8d9 to 8cd58cf Compare August 26, 2023 14:17
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 9 times, most recently from f7c0238 to ea241ad Compare September 4, 2023 20:04
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from ea241ad to 9f67630 Compare September 4, 2023 20:13
@renovate renovate bot merged commit 88f3eb9 into main Sep 4, 2023
5 checks passed
@renovate renovate bot deleted the renovate/rules_python-0.x branch September 4, 2023 22:57
cgrindel pushed a commit to k1nkreet/rules_bazel_integration_test that referenced this pull request Sep 27, 2023
…#153)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [rules_python](https://togithub.com/bazelbuild/rules_python) |
http_archive | minor | `0.20.0` -> `0.25.0` |

---

### Release Notes

<details>
<summary>bazelbuild/rules_python (rules_python)</summary>

###
[`v0.25.0`](https://togithub.com/bazelbuild/rules_python/blob/HEAD/CHANGELOG.md#0250---2023-08-22)

[Compare
Source](https://togithub.com/bazelbuild/rules_python/compare/0.24.0...0.25.0)

##### Changed

-   Python version patch level bumps:
    -   3.9.16 -> 3.9.17
    -   3.10.9 -> 3.10.12
    -   3.11.1 -> 3.11.4
-   (bzlmod) `pip.parse` can no longer automatically use the default
    Python version; this was an unreliable and unsafe behavior. The
    `python_version` arg must always be explicitly specified.

##### Fixed

- (docs) Update docs to use correct bzlmod APIs and clarify how and when
to use
    various APIs.
- (multi-version) The `main` arg is now correctly computed and usually
optional.
- (bzlmod) `pip.parse` no longer requires a call for whatever the
configured
    default Python version is.

##### Added

-   Created a changelog.
-   (gazelle) Stop generating unnecessary imports.
-   (toolchains) s390x supported for Python 3.9.17, 3.10.12, and 3.11.4.

[0.25.0]:
https://togithub.com/bazelbuild/rules_python/releases/tag/0.25.0

###
[`v0.24.0`](https://togithub.com/bazelbuild/rules_python/blob/HEAD/CHANGELOG.md#0240---2023-07-11)

[Compare
Source](https://togithub.com/bazelbuild/rules_python/compare/0.23.1...0.24.0)

##### Changed

-   **BREAKING** (gazelle) Gazelle 0.30.0 or higher is required
-   (bzlmod) `@python_aliases` renamed to \`@python_versions
-   (bzlmod) `pip.parse` arg `name` renamed to `hub_name`
- (bzlmod) `pip.parse` arg `incompatible_generate_aliases` removed and
always
    true.

##### Fixed

-   (bzlmod) Fixing Windows Python Interpreter symlink issues
-   (py_wheel) Allow twine tags and args
-   (toolchain, bzlmod) Restrict coverage tool visibility under bzlmod
-   (pip) Ignore temporary pyc.NNN files in wheels
-   (pip) Add format() calls to glob_exclude templates
-   plugin_output in py_proto_library rule

##### Added

-   Using Gazelle's lifecycle manager to manage external processes
- (bzlmod) `pip.parse` can be called multiple times with different
Python
    versions
- (bzlmod) Allow bzlmod `pip.parse` to reference the default python
toolchain and interpreter
-   (bzlmod) Implementing wheel annotations via `whl_mods`
-   (gazelle) support multiple requirements files in manifest generation
- (py_wheel) Support for specifying `Description-Content-Type` and
`Summary` in METADATA
-   (py_wheel) Support for specifying `Project-URL`
- (compile_pip_requirements) Added `generate_hashes` arg (default True)
to
    control generating hashes
-   (pip) Create all_data_requirements alias
-   Expose Python C headers through the toolchain.

[0.24.0]:
https://togithub.com/bazelbuild/rules_python/releases/tag/0.24.0

###
[`v0.23.1`](https://togithub.com/bazelbuild/rules_python/releases/tag/0.23.1)

[Compare
Source](https://togithub.com/bazelbuild/rules_python/compare/0.23.0...0.23.1)

#### Using Bzlmod with Bazel 6

Add to your `MODULE.bazel` file:

```starlark
bazel_dep(name = "rules_python", version = "0.23.1")

pip = use_extension("@&#8203;rules_python//python:extensions.bzl", "pip")

pip.parse(
    name = "pip",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")
```

#### Using WORKSPACE

Paste this snippet into your `WORKSPACE` file:

```starlark
load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "84aec9e21cc56fbc7f1335035a71c850d1b9b5cc6ff497306f84cced9a769841",
    strip_prefix = "rules_python-0.23.1",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.23.1/rules_python-0.23.1.tar.gz",
)

load("@&#8203;rules_python//python:repositories.bzl", "py_repositories")

py_repositories()
```

##### Gazelle plugin

Paste this snippet into your `WORKSPACE` file:

```starlark
load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "84aec9e21cc56fbc7f1335035a71c850d1b9b5cc6ff497306f84cced9a769841",
    strip_prefix = "rules_python-0.23.1/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.23.1/rules_python-0.23.1.tar.gz",
)

### To compile the rules_python gazelle extension from source,
### we must fetch some third-party go dependencies that it uses.

load("@&#8203;rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")

_py_gazelle_deps()
```

#### What's Changed

- fix(bzlmod+gazelle): update BCR release presubmit to use correct
example by [@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1264

**Full Changelog**:
bazelbuild/rules_python@0.23.0...0.23.1

###
[`v0.23.0`](https://togithub.com/bazelbuild/rules_python/releases/tag/0.23.0)

[Compare
Source](https://togithub.com/bazelbuild/rules_python/compare/0.22.0...0.23.0)

#### Using Bzlmod with Bazel 6

NOTE: bzlmod support is still experimental; apis are still subject to
change

This release introduces two notable changes to bzlmod support:

- A default toolchain is automatically registered for you. You no longer
need to call `register_toolchains()` yourself. Depending
on rules_python through bazel_dep is sufficient. Note, however, the
Python version used for this default toolchain will change
    frequently/unexpectedly to track the a recent Python version.
- The `name` arg of `python.toolchain` has been removed. The toolchain
repo name format is `python_X_Y` e.g. `python_3_11`.

Add to your `MODULE.bazel` file:

```starlark
bazel_dep(name = "rules_python", version = "0.23.0")

pip = use_extension("@&#8203;rules_python//python:extensions.bzl", "pip")

pip.parse(
    name = "pip",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")
```

#### Using WORKSPACE

Paste this snippet into your `WORKSPACE` file:

```starlark
load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "8272287b125a23bfc79650ecbbc045ebcaee4d632338b1a50aad34357bcbadce",
    strip_prefix = "rules_python-0.23.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.23.0/rules_python-0.23.0.tar.gz",
)

load("@&#8203;rules_python//python:repositories.bzl", "py_repositories")

py_repositories()
```

##### Gazelle plugin

Paste this snippet into your `WORKSPACE` file:

```starlark
load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "8272287b125a23bfc79650ecbbc045ebcaee4d632338b1a50aad34357bcbadce",
    strip_prefix = "rules_python-0.23.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.23.0/rules_python-0.23.0.tar.gz",
)

### To compile the rules_python gazelle extension from source,
### we must fetch some third-party go dependencies that it uses.

load("@&#8203;rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")

_py_gazelle_deps()
```

#### What's Changed

- feat(bzlmod): Allowing multiple python.toolchain extension calls by
[@&#8203;chrislovecnm](https://togithub.com/chrislovecnm) in
[bazelbuild/rules_python#1230
- build: Upgrade Gazelle to v0.31.0 by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[bazelbuild/rules_python#1240
- fix: make `import python.runfiles` work with
`--experimental_python_import_all_repositories=false` by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1243
- feat(bzlmod): Moving register.toolchains internal by
[@&#8203;chrislovecnm](https://togithub.com/chrislovecnm) in
[bazelbuild/rules_python#1238
- docs(compile_pip_requirements): Add note on requirements.txt VC by
[@&#8203;boomanaiden154](https://togithub.com/boomanaiden154) in
[bazelbuild/rules_python#1245
- cleanup: Set toolchain target_setting directly instead of via inline
ternary by [@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1246
- fix(bzlmod): give precedence to the first seen versioned toolchain by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1244
- chore: add a pre-commit hook to maintain deleted packages by
[@&#8203;aignas](https://togithub.com/aignas) in
[bazelbuild/rules_python#1208
- chore: auto-publish gazelle module to BCR by
[@&#8203;kormide](https://togithub.com/kormide) in
[bazelbuild/rules_python#1247
- fix(coverage): bump to latest coverage.py and fix import shadowing by
[@&#8203;aignas](https://togithub.com/aignas) in
[bazelbuild/rules_python#1249
- feat: add ppc64le releases and update to 3.10.11, 3.11.3 for
python-build-standalone by
[@&#8203;clnperez](https://togithub.com/clnperez) in
[bazelbuild/rules_python#1234
- fix(bzlmod)!: Remove ability to specify toolchain repo name. by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1258
- fix: update correct requirements lock file when using os specific lock
files by [@&#8203;Rasrack](https://togithub.com/Rasrack) in
[bazelbuild/rules_python#1123
- fix: use `only-binary` for `download_only` `pip download` by
[@&#8203;lpulley](https://togithub.com/lpulley) in
[bazelbuild/rules_python#1219
- feat: Adding variable support for distribution in py_wheel by
[@&#8203;ns-tkonduri](https://togithub.com/ns-tkonduri) in
[bazelbuild/rules_python#1251
- feat(bzlmod): Register a default toolchain by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1259

#### New Contributors

- [@&#8203;boomanaiden154](https://togithub.com/boomanaiden154) made
their first contribution in
[bazelbuild/rules_python#1245
- [@&#8203;clnperez](https://togithub.com/clnperez) made their first
contribution in
[bazelbuild/rules_python#1234
- [@&#8203;lpulley](https://togithub.com/lpulley) made their first
contribution in
[bazelbuild/rules_python#1219
- [@&#8203;ns-tkonduri](https://togithub.com/ns-tkonduri) made their
first contribution in
[bazelbuild/rules_python#1251

**Full Changelog**:
bazelbuild/rules_python@0.22.0...0.23.0

###
[`v0.22.0`](https://togithub.com/bazelbuild/rules_python/releases/tag/0.22.0)

[Compare
Source](https://togithub.com/bazelbuild/rules_python/compare/0.21.0...0.22.0)

#### Notable and Breaking Changes

##### Bzlmod extension paths have changed

As part of fixing some fundamental issues with the bzlmod support, we
had to change the path to our extensions. Instead of all extensions
being in a single `extensions.bzl` file, each extension is in its own
file. Users must update the file path in their `use_repo()` statements
as follows:

- `use_extension("@&#8203;rules_python//python:extensions.bzl",
"python")` ->
`use_extension("@&#8203;rules_python//python/extensions:python.bzl",
"python")`
- `use_extension("@&#8203;rules_python//python:extensions.bzl", "pip")`
-> `use_extension("@&#8203;rules_python//python/extensions:pip.bzl",
"pip")`

The following `sed` commands should approximate the necessary changes:

```
sed 'sXuse_extension("@&#8203;rules_python//python:extensions.bzl", "python")Xuse_extension("@&#8203;rules_python//python/extensions:python.bzl", "python")X'`
sed 'sXuse_extension("@&#8203;rules_python//python:extensions.bzl", "pip")Xuse_extension("@&#8203;rules_python//python/extensions:pip.bzl", "pip")X'`

```

See `examples/bzlmod_build_file_generation/MODULE.bazel` for an example
of the new paths.

##### Lockfile output churn

The output of lockfiles has slightly changed. Though functionally the
same, their integrity hashes will change.

***

#### Using Bzlmod with Bazel 6

NOTE: Bzlmod support is still in beta.

Add to your `MODULE.bazel` file:

```starlark
bazel_dep(name = "rules_python", version = "0.22.0")

pip = use_extension("@&#8203;rules_python//python/extensions:pip.bzl", "pip")

pip.parse(
    name = "pip",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")

### (Optional) Register a specific python toolchain instead of using the host version
python = use_extension("@&#8203;rules_python//python/extensions:python.bzl", "python")

python.toolchain(
    name = "python3_9",
    python_version = "3.9",
)

use_repo(python, "python3_9_toolchains")

register_toolchains(
    "@&#8203;python3_9_toolchains//:all",
)
```

#### Using WORKSPACE

Paste this snippet into your `WORKSPACE` file:

```starlark
load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "863ba0fa944319f7e3d695711427d9ad80ba92c6edd0b7c7443b84e904689539",
    strip_prefix = "rules_python-0.22.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.22.0/rules_python-0.22.0.tar.gz",
)

load("@&#8203;rules_python//python:repositories.bzl", "py_repositories")

py_repositories()
```

##### Gazelle plugin

Paste this snippet into your `WORKSPACE` file:

```starlark
load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "863ba0fa944319f7e3d695711427d9ad80ba92c6edd0b7c7443b84e904689539",
    strip_prefix = "rules_python-0.22.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.22.0/rules_python-0.22.0.tar.gz",
)

### To compile the rules_python gazelle extension from source,
### we must fetch some third-party go dependencies that it uses.

load("@&#8203;rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")

_py_gazelle_deps()
```

#### What's Changed

- fix: remove reference to
@&#8203;bazel_tools//tools/python/private:defs.bzl by
[@&#8203;comius](https://togithub.com/comius) in
[bazelbuild/rules_python#1173
- docs: Tell how to use GitHub to find commits in an upcoming release.
by [@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1092
- fix: compile_pip_requirements test from external repositories by
[@&#8203;Rasrack](https://togithub.com/Rasrack) in
[bazelbuild/rules_python#1124
- feat: add Python 3.8.16 by
[@&#8203;jml-derek](https://togithub.com/jml-derek) in
[bazelbuild/rules_python#1168
- test: Set mac platform for test_mac_requires_darwin_for_execution by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1179
- fix: Don't reference deleted private bazel_tools bzl file by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1180
- docs: Add starlark directive to code snippet by
[@&#8203;blorente](https://togithub.com/blorente) in
[bazelbuild/rules_python#1170
- tests: Upgrade rules_testing to 0.0.5 by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1184
- tests: Set linux platform for
test_non_mac_doesnt_require_darwin_for_execution by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1183
- fix(bzlmod): correctly template repository macros for requirements,
etc by [@&#8203;aignas](https://togithub.com/aignas) in
[bazelbuild/rules_python#1190
- type:docs Update README.md by
[@&#8203;yuanweixin](https://togithub.com/yuanweixin) in
[bazelbuild/rules_python#1186
- fix: Allow passing a tuple to the `tags` attribute. by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1191
- tests: Add skylib to various test dependencies to fix CI by
[@&#8203;chrislovecnm](https://togithub.com/chrislovecnm) in
[bazelbuild/rules_python#1199
- feat: removing bzlmod from example by
[@&#8203;chrislovecnm](https://togithub.com/chrislovecnm) in
[bazelbuild/rules_python#1200
- feat: propagate visibility attribute for py_wheel publishing by
[@&#8203;chrislovecnm](https://togithub.com/chrislovecnm) in
[bazelbuild/rules_python#1203
- docs: fix typos in pip_repository docs by
[@&#8203;martis42](https://togithub.com/martis42) in
[bazelbuild/rules_python#1202
- tests: Force analysis test labels to resolve within
@&#8203;rules_python context by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1187
- fix(update_deleted_packages.sh): allow to run from anywhere in the
repo by [@&#8203;aignas](https://togithub.com/aignas) in
[bazelbuild/rules_python#1206
- feat(bzlmod): expose platform-agnostic repo target for toolchain
interpreter by [@&#8203;chrislovecnm](https://togithub.com/chrislovecnm)
in
[bazelbuild/rules_python#1155
- fix(update_deleted_packages.sh): wheels example should not be included
in .bazelrc by [@&#8203;aignas](https://togithub.com/aignas) in
[bazelbuild/rules_python#1207
- fix: Strip trailing newline from python output by
[@&#8203;illicitonion](https://togithub.com/illicitonion) in
[bazelbuild/rules_python#1212
- fix: manually ignore bazel-\* directories to make using custom Bazel
builds easier by [@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1181
- test(bzlmod): explicitly enable bzlmod in the test harness by
[@&#8203;aignas](https://togithub.com/aignas) in
[bazelbuild/rules_python#1204
- feat(bzlmod): Cleaning up interpreter resolution by
[@&#8203;chrislovecnm](https://togithub.com/chrislovecnm) in
[bazelbuild/rules_python#1218
- feat(bzlmod)!: Move each bzlmod extension into its own file by
[@&#8203;chrislovecnm](https://togithub.com/chrislovecnm) in
[bazelbuild/rules_python#1226
- Adding bzlmod support document by
[@&#8203;chrislovecnm](https://togithub.com/chrislovecnm) in
[bazelbuild/rules_python#1214
- test(coverage): add a test to check the sys.path under bzlmod by
[@&#8203;aignas](https://togithub.com/aignas) in
[bazelbuild/rules_python#1223
- fix(toolchain): set correct return attrs to remove non-hermeticity
warning by [@&#8203;aignas](https://togithub.com/aignas) in
[bazelbuild/rules_python#1231
- fix: allow url fragments in requirements file by
[@&#8203;mattoberle](https://togithub.com/mattoberle) in
[bazelbuild/rules_python#1195
- fix: `example/build_file_generation/README.md` by
[@&#8203;ofey404](https://togithub.com/ofey404) in
[bazelbuild/rules_python#1164
- fix: Using canonical name in requirements.bzl by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[bazelbuild/rules_python#1176
- feat(bzlmod): support entry_point macro by
[@&#8203;aignas](https://togithub.com/aignas) in
[bazelbuild/rules_python#1220

#### New Contributors

- [@&#8203;Rasrack](https://togithub.com/Rasrack) made their first
contribution in
[bazelbuild/rules_python#1124
- [@&#8203;jml-derek](https://togithub.com/jml-derek) made their first
contribution in
[bazelbuild/rules_python#1168
- [@&#8203;blorente](https://togithub.com/blorente) made their first
contribution in
[bazelbuild/rules_python#1170
- [@&#8203;yuanweixin](https://togithub.com/yuanweixin) made their first
contribution in
[bazelbuild/rules_python#1186
- [@&#8203;ofey404](https://togithub.com/ofey404) made their first
contribution in
[bazelbuild/rules_python#1164

**Full Changelog**:
bazelbuild/rules_python@0.21.0...0.22.0

###
[`v0.21.0`](https://togithub.com/bazelbuild/rules_python/releases/tag/0.21.0)

[Compare
Source](https://togithub.com/bazelbuild/rules_python/compare/0.20.0...0.21.0)

#### Using Bzlmod with Bazel 6

Add to your `MODULE.bazel` file:

```starlark
bazel_dep(name = "rules_python", version = "0.21.0")

pip = use_extension("@&#8203;rules_python//python:extensions.bzl", "pip")

pip.parse(
    name = "pip",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")

### (Optional) Register a specific python toolchain instead of using the host version
python = use_extension("@&#8203;rules_python//python:extensions.bzl", "python")

python.toolchain(
    name = "python3_9",
    python_version = "3.9",
)

use_repo(python, "python3_9_toolchains")

register_toolchains(
    "@&#8203;python3_9_toolchains//:all",
)
```

#### Using WORKSPACE

Paste this snippet into your `WORKSPACE` file:

```starlark
load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "94750828b18044533e98a129003b6a68001204038dc4749f40b195b24c38f49f",
    strip_prefix = "rules_python-0.21.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.21.0/rules_python-0.21.0.tar.gz",
)

load("@&#8203;rules_python//python:repositories.bzl", "py_repositories")

py_repositories()
```

##### Gazelle plugin

Paste this snippet into your `WORKSPACE` file:

```starlark
load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "94750828b18044533e98a129003b6a68001204038dc4749f40b195b24c38f49f",
    strip_prefix = "rules_python-0.21.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.21.0/rules_python-0.21.0.tar.gz",
)

### To compile the rules_python gazelle extension from source,
### we must fetch some third-party go dependencies that it uses.

load("@&#8203;rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")

_py_gazelle_deps()
```

#### What's Changed

- cleanup: factor reexports.bzl into the respective implementation files
by [@&#8203;rickeylev](https://togithub.com/rickeylev) in
[bazelbuild/rules_python#1137
- fix: bump installer to handle windows better by
[@&#8203;f0rmiga](https://togithub.com/f0rmiga) in
[bazelbuild/rules_python#1138
- build: Fixing buildifier by
[@&#8203;chrislovecnm](https://togithub.com/chrislovecnm) in
[bazelbuild/rules_python#1148
- docs: Updating documentation for bzlmod by
[@&#8203;chrislovecnm](https://togithub.com/chrislovecnm) in
[bazelbuild/rules_python#1149
- fix: use a consistent buildifier version for CI and pre-commit by
[@&#8203;aignas](https://togithub.com/aignas) in
[bazelbuild/rules_python#1151
- chore: bump buildifier to 6.1.0 by
[@&#8203;aignas](https://togithub.com/aignas) in
[bazelbuild/rules_python#1152
- fix: correct the labels returned by all_requirements lists by
[@&#8203;aignas](https://togithub.com/aignas) in
[bazelbuild/rules_python#1146
- fix: gazelle correctly adds new py_test rules by
[@&#8203;amartani](https://togithub.com/amartani) in
[bazelbuild/rules_python#1143
- fix: respect kind mapping by
[@&#8203;OniOni](https://togithub.com/OniOni) in
[bazelbuild/rules_python#1158
- test: cleanup gazelle tests and run them in parallel by
[@&#8203;aignas](https://togithub.com/aignas) in
[bazelbuild/rules_python#1159
- \[docs] Fixing rule name in coverage.md docs by
[@&#8203;anfelbar](https://togithub.com/anfelbar) in
[bazelbuild/rules_python#1162
- feat: Support specifying multiple download URLs in tool_versions. by
[@&#8203;quval](https://togithub.com/quval) in
[bazelbuild/rules_python#1145

#### New Contributors

- [@&#8203;amartani](https://togithub.com/amartani) made their first
contribution in
[bazelbuild/rules_python#1143
- [@&#8203;anfelbar](https://togithub.com/anfelbar) made their first
contribution in
[bazelbuild/rules_python#1162
- [@&#8203;quval](https://togithub.com/quval) made their first
contribution in
[bazelbuild/rules_python#1145

**Full Changelog**:
bazelbuild/rules_python@0.20.0...0.21.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/bazel-contrib/rules_bazel_integration_test).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS41NC4wIiwidXBkYXRlZEluVmVyIjoiMzYuNzguOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant