generated from bazel-contrib/rules-template
-
Notifications
You must be signed in to change notification settings - Fork 4
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.37.2 #380
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16fea69
to
cdcb070
Compare
cdcb070
to
16f2825
Compare
16f2825
to
b5b4d3a
Compare
d60377c
to
e8d4676
Compare
e8d4676
to
246165a
Compare
This is to resolve the error ``` util/BUILD.bazel:50:10: in deps attribute of py_binary rule //util:update_filegroups: '@@rules_python~//python/runfiles:runfiles' does not have mandatory providers: 'PyInfo' or 'CcInfo'. Since this rule was created by the macro 'py_binary', the error might have been caused by the macro implementation ``` Observed [on CI](https://github.com/aherrmann/rules_zig/actions/runs/11571742693/job/32210283098?pr=380#step:3:758) for [#380](#380) caused by different identities assigned to the builtin and the @rules_python `PyInfo` and `CcInfo` providers. ``` $ bazel cquery --output starlark --starlark:expr 'providers(target)' @@rules_python~//python/runfiles:runfiles { "@@rules_python~//python/private:py_info.bzl%PyInfo": struct(...), "@@rules_python~//python/private:py_cc_link_params_info.bzl%PyCcLinkParamsInfo": struct(cc_info = struct(..)), ... } ```
This reverts commit 1348c3b. The --incompatible_python_disallow_native_rules flag fails in WORKSPACE mode due to incompatible use in the builtin `@bazel_tools` repo. See https://github.com/aherrmann/rules_zig/actions/runs/11626106944/job/32377199087?pr=380#step:3:762 ``` (07:45:07) ERROR: /home/runner/.cache/bazel-repo/bazel/_bazel_runner/e97befc866f153aa83e528704066dbd2/external/bazel_tools/tools/python/BUILD:110:31: in py_runtime rule @@bazel_tools//tools/python:_autodetecting_py3_runtime: Traceback (most recent call last): File "/virtual_builtins_bzl/common/python/py_runtime_rule.bzl", line 24, column 25, in _py_runtime_impl File "/virtual_builtins_bzl/common/python/common.bzl", line 520, column 13, in check_native_allowed Error in fail: @bazel_tools//tools/python:_autodetecting_py3_runtime not allowed to use native.py_runtime Generated by: define_autodetecting_toolchain(name=autodetecting_toolchain) in tools/python/BUILD:110:31 Allowlist: no allowlist specified; all disallowed; specify one with --python_native_rules_allowlist Migrate to using @rules_python, see bazelbuild/bazel#17773 FIXCMD: add_python_loads --target=@bazel_tools//tools/python:_autodetecting_py3_runtime --rule=py_runtime --generator_name=autodetecting_toolchain --location=tools/python/BUILD:110:31 ``` The `@bazel_tools` repo cannot be modified, so the `FIXCMD` solution does not apply. The allowlist flag expects a package_group, but `@bazel_tools` has no pre-defined package_group, and a user defined `package_group` cannot refer to other workspaces because elements of the `packages` attribute must start with `//`. See the discussion around the following comment for other solutions: bazelbuild/bazel#17773 (comment)
a067de8
to
3beeee9
Compare
renovate bot
pushed a commit
that referenced
this pull request
Nov 1, 2024
This is to resolve the error ``` util/BUILD.bazel:50:10: in deps attribute of py_binary rule //util:update_filegroups: '@@rules_python~//python/runfiles:runfiles' does not have mandatory providers: 'PyInfo' or 'CcInfo'. Since this rule was created by the macro 'py_binary', the error might have been caused by the macro implementation ``` Observed [on CI](https://github.com/aherrmann/rules_zig/actions/runs/11571742693/job/32210283098?pr=380#step:3:758) for [#380](#380) caused by different identities assigned to the builtin and the @rules_python `PyInfo` and `CcInfo` providers. ``` $ bazel cquery --output starlark --starlark:expr 'providers(target)' @@rules_python~//python/runfiles:runfiles { "@@rules_python~//python/private:py_info.bzl%PyInfo": struct(...), "@@rules_python~//python/private:py_cc_link_params_info.bzl%PyCcLinkParamsInfo": struct(cc_info = struct(..)), ... } ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.36.0
->0.37.2
0.36.0
->0.37.2
Release Notes
bazelbuild/rules_python (rules_python)
v0.37.2
Compare Source
Using Bzlmod
Add to your
MODULE.bazel
file:Using WORKSPACE
Paste this snippet into your
WORKSPACE
file:Gazelle plugin
Paste this snippet into your
WORKSPACE
file:Full Changelog: bazel-contrib/rules_python@0.37.1...0.37.2
v0.37.1
Compare Source
{#v0-37-1-fixed}
Fixed
--incompatible_python_disallow_native_rules
no longercauses rules_python rules to fail
(#2326).
{#v0-37-0}
v0.37.0
Compare Source
{#v0-37-0-changed}
Changed
py_library
no longer puts its source files or generated pycfiles in runfiles; it's the responsibility of consumers (e.g. binaries) to
populate runfiles with the necessary files. Adding source files to runfiles
can be temporarily restored by setting {obj}
--add_srcs_to_runfiles=enabled
,but this flag will be removed in a subsequent releases.
PyInfo.transitive_sources
is now added to runfiles. These files are.py
files that are required to be added to runfiles by downstream binaries(or equivalent).
py_runtime.implementation_name
now defaults tocpython
(previously it defaulted to None).
disabled by setting
{obj}
--@​rules_python//python/config_settings:exec_tools_toolchain=disabled
.{#v0-37-0-fixed}
Fixed
python.override(minor_mapping)
now merges the default and theoverridden versions ensuring that the resultant
minor_mapping
will alwayshave all of the python versions.
--python_version
flag will now bealways set to the default python toolchain version value.
pip.parse.extra_pip_args
all theway to {obj}
whl_library
. What is more we will pass theextra_pip_args
to{obj}
whl_library
forsdist
distributions when using{attr}
pip.parse.experimental_index_url
. See#2239.
RECORD
fileRECORD
file entry elements are now quoted if necessary when awheel is created
case where a requirement has many
--hash=sha256:...
flagscompile_pip_requirements
passesenv
to theX.update
target (andnot only to the
X_test
target, a bug introduced in#1067).
python_register_toolchains(register_toolchains=True)
is respected(#1675).
pyc_collection
attribute now correctlyenables (or disables) using pyc files from targets transitively
pip.override
'sfile
(#2294).
rules_shell
dev dependency and moved ash_test
targetoutside of the
//:BUILD.bazel
file.Fixes #2299.
{#v0-37-0-added}
Added
compress = (True|False)
to allow disablingcompression to speed up development.
//python/config_settings:python_version_major_minor
hasbeen exposed for users to be able to match on the
X.Y
version of a Pythoninterpreter.
merge_py_infos()
so user rules can merge and propagatePyInfo
without losing information.3.8 -> 3.8.20
3.9 -> 3.9.20
3.10 -> 3.10.15
3.11 -> 3.11.10
3.12 -> 3.12.7
coverage.py
to 7.6.1.download_only
flag to disable usage ofsdists
when {bzl:attr}
pip.parse.experimental_index_url
is set.PyInfo.transitive_implicit_pyc_files
,{obj}
PyInfo.transitive_implicit_pyc_source_files
.{#v0-37-0-removed}
Removed
--precompile_add_to_runfiles
has been removed.--pyc_collection
has been removed. Thepyc_collection
attribute now bases its default on {obj}
--precompile
.precompile=if_generated_source
value has been removed.precompile_source_retention=omit_if_generated_source
value has been removed.{#v0-36-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.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.