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.18.0 #134

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 24, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
rules_python http_archive minor 0.16.2 -> 0.18.0

Release Notes

bazelbuild/rules_python

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

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: bazelbuild/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: bazelbuild/rules_python@0.16.2...0.17.3

v0.17.2

Compare Source

v0.17.1

Compare Source

v0.17.0

Compare Source


Configuration

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

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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.


  • 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 changed the title chore(deps): update dependency rules_python to v0.17.0 chore(deps): update dependency rules_python to v0.17.2 Jan 27, 2023
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.17.2 chore(deps): update dependency rules_python to v0.17.3 Jan 27, 2023
@renovate renovate bot changed the title chore(deps): update dependency rules_python to v0.17.3 chore(deps): update dependency rules_python to v0.18.0 Feb 8, 2023
@renovate renovate bot force-pushed the renovate/rules_python-0.x branch from ad971e2 to e7c303b Compare February 13, 2023 07:58
@renovate
Copy link
Contributor Author

renovate bot commented Feb 14, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@mattem
Copy link
Member

mattem commented Feb 14, 2023

Blocked on breakage with < bazel 6 and rules_python 0.18

@gregmagolan gregmagolan added the deps Renovate PRs label Feb 14, 2023
@mattem mattem enabled auto-merge (squash) September 13, 2023 21:29
@mattem mattem merged commit 192e1f8 into main Sep 13, 2023
1 check passed
@mattem mattem deleted the renovate/rules_python-0.x branch September 13, 2023 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deps Renovate PRs
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants