chore(deps): update dependency rules_python to v0.31.0 #212
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.28.0
->0.31.0
0.28.0
->0.31.0
Release Notes
bazelbuild/rules_python (rules_python)
v0.31.0
Compare Source
Changed
directly and the rules bundled with Bazel are not used. Bazel 6 and earlier
continue to use the Bazel builtin symbols. Of particular note, this means,
under Bazel 7, the builtin global symbol
PyInfo
is not the same as whatis loaded from rules_python. The same is true of
PyRuntimeInfo
.v0.30.0
Compare Source
Changed
(toolchains) Windows hosts always ignore pyc files in the downloaded runtimes.
This fixes issues due to pyc files being created at runtime and affecting the
definition of what files were considered part of the runtime.
(pip_parse) Added the
envsubst
parameter, which enables environment variablesubstitutions in the
extra_pip_args
attribute.(pip_repository) Added the
envsubst
parameter, which enables environmentvariable substitutions in the
extra_pip_args
attribute.Fixed
(bzlmod) pip.parse now does not fail with an empty
requirements.txt
.(py_wheel) Wheels generated by
py_wheel
now preserve executable bits whenbeing extracted by
installer
and/orpip
.(coverage) During the running of lcov, the stdout/stderr was causing test
failures. By default, suppress output when generating lcov. This can be
overridden by setting 'VERBOSE_COVERAGE'. This change only affect bazel
7.x.x and above.
(toolchain) Changed the
host_toolchain
to symlink all files to supportWindows host environments without symlink support.
(PyRuntimeInfo) Switch back to builtin PyRuntimeInfo for Bazel 6.4 and when
pystar is disabled. This fixes an error about
target ... does not have ... PyRuntimeInfo
.(#1732)
Added
(py_wheel) Added
requires_file
andextra_requires_files
attributes.(whl_library) experimental_target_platforms now supports specifying the
Python version explicitly and the output
BUILD.bazel
file will be correctirrespective of the python interpreter that is generating the file and
extracting the
whl
distribution. Multiple python target version can bespecified and the code generation will generate version specific dependency
closures but that is not yet ready to be used and may break the build if
the default python version is not selected using
common --@​rules_python//python/config_settings:python_version=X.Y.Z
.New Python versions available:
3.11.7
,3.12.1
usinghttps://github.com/indygreg/python-build-standalone/releases/tag/20240107.
(toolchain) Allow setting
x.y
as thepython_version
parameter inthe version-aware
py_binary
andpy_test
rules. This allows users touse the same rule import for testing with specific Python versions and
rely on toolchain configuration and how the latest version takes precedence
if e.g.
3.8
is selected. That also simplifies.bazelrc
for any usersthat set the default
python_version
string flag in that way.(toolchain) The runtime's shared libraries (libpython.so et al) can be
accessed using
@rules_python//python/cc:current_py_cc_libs
. This usestoolchain resolution, so the files are from the same runtime used to run a
target. If you were previously using e.g.
@python_3_11//:libpython
, thenswitch to
:current_py_cc_libs
for looser coupling to the underlying runtimerepo implementation.
(repo rules) The environment variable
RULES_PYTHON_REPO_DEBUG=1
can beset to make repository rules log detailed information about what they're
up to.
(coverage) Add support for python 3.12 and bump
coverage.py
to7.4.1.
v0.29.0
Compare Source
Changed
incompatible_generate_aliases
feature flagsfrom
pip_parse
andgazelle
got removed. They had been flipped toTrue
in 0.27.0 release.
incompatible_normalize_name
andincompatible_normalize_version
flags have been removed. They had beenflipped to
True
in 0.27.0 release.using the
X.Y
python version notation. This improves cross moduleinteroperability and allows to share wheels built by interpreters using
different patch versions.
Fixed
(bzlmod pip.parse) Use a platform-independent reference to the interpreter
pip uses. This reduces (but doesn't eliminate) the amount of
platform-specific content in
MODULE.bazel.lock
files; Follow#1643 for removing
platform-specific content in
MODULE.bazel.lock
files.(wheel) The stamp variables inside the distribution name are no longer
lower-cased when normalizing under PEP440 conventions.
Added
(toolchains)
python_register_toolchains
now also generates a repositorythat is suffixed with
_host
, that has a single label:python
that is asymlink to the python interpreter for the host platform. The intended use is
mainly in
repository_rule
, which are always run usinghost
platformPython. This means that
WORKSPACE
users can now copy therequirements.bzl
file for vendoring as seen in the updated
pip_parse_vendored
example.(runfiles)
rules_python.python.runfiles.Runfiles
now has a staticCreate
method to make imports more ergonomic. Users should only need to import the
Runfiles
object to locate runfiles.(toolchains)
PyRuntimeInfo
now includes ainterpreter_version_info
fieldthat contains the static version information for the given interpreter.
This can be set via
py_runtime
when registering an interpreter toolchain,and will done automatically for the builtin interpreter versions registered via
python_register_toolchains
.Note that this only available on the Starlark implementation of the provider.
(config_settings) Added
//python/config_settings:is_python_X.Y
configsettings to match on minor Python version. These settings match any
X.Y
version instead of just an exact
X.Y.Z
version.Configuration
📅 Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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 these updates again.
This PR has been generated by Mend Renovate. View repository job log here.