Skip to content

chore(deps): update dependency rules_python to v0.22.0 #115

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

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 8, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
rules_python http_archive minor 0.5.0 -> 0.22.0

Release Notes

bazelbuild/rules_python

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: bazel-contrib/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: bazel-contrib/rules_python@0.20.0...0.21.0

v0.20.0

Compare Source

Using Bzlmod with Bazel 6

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "0.20.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 = "a644da969b6824cc87f8fe7b18101a8a6c57da5db39caa6566ec6109f37d2141",
    strip_prefix = "rules_python-0.20.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.20.0/rules_python-0.20.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 = "a644da969b6824cc87f8fe7b18101a8a6c57da5db39caa6566ec6109f37d2141",
    strip_prefix = "rules_python-0.20.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.20.0/rules_python-0.20.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: bazel-contrib/rules_python@0.19.0...0.20.0

v0.19.0

Compare Source

Using Bzlmod with Bazel 6

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "0.19.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 = "ffc7b877c95413c82bfd5482c017edcf759a6250d8b24e82f41f3c8b8d9e287e",
    strip_prefix = "rules_python-0.19.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.19.0/rules_python-0.19.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 = "ffc7b877c95413c82bfd5482c017edcf759a6250d8b24e82f41f3c8b8d9e287e",
    strip_prefix = "rules_python-0.19.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.19.0/rules_python-0.19.0.tar.gz",
)

What's Changed

Full Changelog: bazel-contrib/rules_python@0.18.0...0.19.0

v0.18.1

Compare Source

Using Bzlmod with Bazel 6

Add to your MODULE.bazel file:

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

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 = "29a801171f7ca190c543406f9894abf2d483c206e14d6acbd695623662320097",
    strip_prefix = "rules_python-0.18.1",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.18.1/rules_python-0.18.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 = "29a801171f7ca190c543406f9894abf2d483c206e14d6acbd695623662320097",
    strip_prefix = "rules_python-0.18.1/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.18.1/rules_python-0.18.1.tar.gz",
)

Relevant Changes

  • Only set py_runtime.coverage_tool for Bazel 6 and higher. (#​1061)

Full Changelog: bazel-contrib/rules_python@0.18.0...0.18.1

v0.18.0

Compare Source

Using Bzlmod with Bazel 6

Add to your MODULE.bazel file:

bazel_dep(name = "rules_python", version = "0.18.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 = "36362b4d54fcb17342f9071e4c38d63ce83e2e57d7d5599ebdde4670b9760664",
    strip_prefix = "rules_python-0.18.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.18.0/rules_python-0.18.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 = "36362b4d54fcb17342f9071e4c38d63ce83e2e57d7d5599ebdde4670b9760664",
    strip_prefix = "rules_python-0.18.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.18.0/rules_python-0.18.0.tar.gz",
)

Relevant Changes

Post-release notes
  • bug #​1056: This release does not work with Bazel 5. Please upgrade to 0.18.1
Coverage

rules_python now includes coverage as part of the toolchain as an opt-in feature. To get started, pass register_coverage_tool = True to python_register_toolchains or python_register_multi_toolchains.

runfiles wheel

The bazel-runfiles wheel is now published to https://pypi.org/project/bazel-runfiles/.

What's Changed

New Contributors

Full Changelog: bazel-contrib/rules_python@0.17.3...0.18.0

v0.17.3

Compare Source

Note, the prior 0.17 tags (0.17.0, 0.17.1, and 0.17.2) were never published as releases and can be ignored.

Breaking Change

The Gazelle extension for Python has been updated to better integrate with the conventions of Python and Bazel. This includes changes to how test files with the prefix or suffix of "test_" and "*_test" are handled. If a test target is not present, these files will now be added to individual py_test targets. To align your projects with these changes, any test utility files that were previously included in py_library targets and have the aforementioned prefix or suffix, will need to be renamed for consistency.

To use the gazelle extension you must now fetch another external repository, rules_python_gazelle_plugin, see the snippet below.
Also, change your gazelle binary registration to load from this new repository:

gazelle(
    name = "gazelle",
    data = GAZELLE_PYTHON_RUNTIME_DEPS,
    gazelle = "@​rules_python_gazelle_plugin//python:gazelle_binary",
)

Using Bzlmod with Bazel 6

Add to your MODULE.bazel file:

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

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 = "8c15896f6686beb5c631a4459a3aa8392daccaab805ea899c9d14215074b60ef",
    strip_prefix = "rules_python-0.17.3",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.17.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 = "8c15896f6686beb5c631a4459a3aa8392daccaab805ea899c9d14215074b60ef",
    strip_prefix = "rules_python-0.17.3/gazelle",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.17.3.tar.gz",
)

What's Changed

New Contributors

Full Changelog: bazel-contrib/rules_python@0.16.2...0.17.3

v0.16.2

Compare Source

Using Bzlmod with Bazel 6

Add to your MODULE.bazel file:

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

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 = "48a838a6e1983e4884b26812b2c748a35ad284fd339eb8e2a6f3adf95307fbcd",
    strip_prefix = "rules_python-0.16.2",
    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.16.2.tar.gz",
)

What's Changed

New Contributors

Full Changelog: bazel-contrib/rules_python@0.16.1...0.16.2

v0.16.1

Compare Source

Using Bzlmod with Bazel 6

Add to your MODULE.bazel file:

bazel_dep(name = "rul

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, 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://app.renovatebot.com/dashboard#github/uhthomas/automata).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMjQuMiIsInVwZGF0ZWRJblZlciI6IjM1LjEwNS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from f45c906 to 62f88fb Compare February 14, 2023 21:57
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.18.0 chore(deps): update dependency rules_python to v0.18.1 Feb 14, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 7 times, most recently from bb85ea9 to 9787bab Compare March 1, 2023 01:42
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.18.1 chore(deps): update dependency rules_python to v0.19.0 Mar 1, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from 9787bab to f674c22 Compare March 20, 2023 20:30
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.19.0 chore(deps): update dependency rules_python to v0.20.0 Mar 20, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 8 times, most recently from 9a941b0 to 39a677a Compare March 26, 2023 12:35
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.20.0 Update dependency rules_python to v0.20.0 Mar 26, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 4 times, most recently from 513ee8c to 088ae33 Compare March 30, 2023 14:24
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 4 times, most recently from 09b90ec to d78031f Compare April 6, 2023 03:30
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 5 times, most recently from f769939 to 0e3d5d5 Compare June 1, 2023 20:04
Repository owner deleted a comment from github-actions bot Jun 1, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 3 times, most recently from db118d5 to 7449f53 Compare June 1, 2023 22:58
Repository owner deleted a comment from github-actions bot Jun 1, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from 7449f53 to accbcc2 Compare June 1, 2023 23:05
Repository owner deleted a comment from github-actions bot Jun 1, 2023
Repository owner deleted a comment from github-actions bot Jun 1, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from accbcc2 to ff4aaac Compare June 1, 2023 23:09
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.22.0 Update dependency rules_python to v0.22.0 Jun 1, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch 8 times, most recently from a2a6f76 to e862a71 Compare June 2, 2023 16:40
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from e862a71 to 6da6a87 Compare June 2, 2023 17:01
@renovate renovate bot changed the title Update dependency rules_python to v0.22.0 chore(deps): update dependency rules_python to v0.22.0 Jun 2, 2023
@uhthomas
Copy link
Owner

uhthomas commented Jun 2, 2023

blocked by rules_k8s

@uhthomas uhthomas closed this Jun 2, 2023
@renovate
Copy link
Contributor Author

renovate bot commented Jun 2, 2023

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (0.22.0). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/rules_python-0.x branch June 2, 2023 17:47
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.

1 participant