This PR contains the following updates:
| Package |
Type |
Update |
Change |
| rules_python |
bazel_dep |
minor |
2.2.0 → 2.3.3 |
Release Notes
bazel-contrib/rules_python (rules_python)
Compare Source
{#v2-3-3-changed}
Changed
- (publish): The twine packages are now configured for three major platforms.
{#v2-3-3-fixed}
Fixed
- (gazelle) Fixed a regression from version 1.8.0 which broke module map
generation for old-style namespace packages.
(#4135).
- (zipapp) Fixed handling of {obj}
PyRuntimeInfo with files = None so creating
zipapp archives does not error.
{#v2-3-2}
Compare Source
{#v2-3-2-fixed}
Fixed
- (pypi) Fixed analysis failures in {obj}
pip.parse for source-less wheels with
dependencies. (#4053)
- (pypi) Fixed the handling of optional args for the {obj}
pip_archive and {obj}whl_archive
repository rules within the {obj}whl_library. From now on we are dropping unsupported args.
- (pypi) Fixed {obj}
pip.parse repository names for Git sources in uv.lock
files by excluding URL query and fragment components
(#4084).
{#v2-3-1}
Compare Source
{#v2-3-1-fixed}
Fixed
- Previous refactor that shipped with 2.3 introduced regression for the
experimental repository cache users. This restores the previous behavior
(#3791).
{#v2-3-0}
Compare Source
{#v2-3-0-changed}
Changed
- (gazelle) BREAKING rules_python 1.5.0 or higher is now required. The Python
extension selects its standard library list on is_python_3.14, which earlier
versions do not define.
{#v2-3-0-fixed}
Fixed
- Fixed
py_binary_rule_builder() / py_test_rule_builder() (from python/api/executables.bzl)
failing at analysis time with a visibility error when used to construct a custom rule from an
external module.
- (compile_pip_requirements) Add the explicit
data attribute and forward it
directly to the generated py_binary, so files passed via data can be
referenced from extra_args using $(location ...).
- (coverage) The warning about a missing bundled
coverage.py wheel is no longer
emitted as we are now falling back to a pure python wheel
(#3950).
- (gazelle) The Python extension now uses the correct standard library module list for
python_version 3.13 and 3.14; previously both fell back to the 3.11 list, so modules
added or removed since then (e.g. compression.zstd, telnetlib) were misclassified. The
fallback list for unrecognized versions is now the newest available one rather than 3.11
(#3978).
- (pypi) Allow
uv_lock to be specified in pip.parse without requiring
requirements_lock (or other os-specific requirement file attributes) to be
set.
- (pypi) Fixed the fixed-point loop that resolves self-referencing extras
(pkg[extra] entries in a package's own Requires-Dist). The loop compared
the number of extras discovered in the current round against the number known
before it, rather than against the size of the merged set. As a result it
could stop before every extra was resolved, silently dropping dependencies
only reachable through two or more pkg[extra] hops, and for the common case
of a package with no self-referencing extras it never converged at all,
running all 10000 rounds while evaluating each wheel's generated BUILD file
(#4039).
- (pypi) Requirement
--hash=<algo>:<digest> pins and Simple API
#<algo>=<digest> URL fragments are now parsed for all hash algorithms
instead of silently dropping everything except sha256. Non-sha256 pins are
matched against the digests advertised by the index and downloads are verified
using the corresponding Subresource Integrity value, and the pins are kept in
the requirement line when falling back to pip
(#3972).
As part of this, whl_library repos created by pip.parse now always pass
the digest via the integrity attribute (SRI format) instead of sha256,
and the lock file facts store digests as <algo>:<digest> values (the facts
version was bumped, so cached index information is refreshed once).
- (pypi)
pip.parse(uv_lock = ...) no longer exposes uv workspace/root members
that resolve to no wheel or sdist (e.g. source = { virtual = "." } or editable
installs). Previously these source-less packages were added to the hub's
all_requirements / all_whl_requirements with an alias to a subpackage that
does not exist, breaking analysis for anything enumerating the full set such as
modules_mapping(wheels = all_whl_requirements)
(#3934).
- (pypi) correctly parse the
index_url for each wheel so that the source registry is forwarded to
the {obj}whl_library. This is so that the purl for package_metadata can be correctly
constructed.
- (pypi) fixed the URL normalization function to correctly handle local paths
enabling wheel sources files to point to an absolute path. Currently it supports
the file://<absolute_path> for linux and windows like paths. We also support
envsubst for the said paths from now on.
{#v2-3-0-added}
Added
- (bzlmod) Added MODULE.bazel flag aliases for Starlark-defined flags:
build_python_zip, incompatible_default_to_explicit_init_py,
python_path, and experimental_python_import_all_repositories.
- (bzlmod) Added the
{obj}explicit_init_py tag class to the `{obj}`config module extension for configuring implicit __init__.py file
generation module-wide.
(#3997,
#2945)
- (cc) Added experimental {obj}
py_extension macro for creating C/C++ Python
extension modules
(#3283).
(cc) Added libc, platform_machine, platform_tag, soabi, and
sys_platform attributes and info fields to {obj}py_cc_toolchain /
{obj}PyCcToolchainInfo.
- (pip,python) Added
pyproject_toml attribute to {obj}pip.default, {obj}pip.parse and {obj}python.defaults to read the default Python version from the requires-python field of pyproject.toml.
- (py_test) Added an opt-in safeguard against
py_test targets that silently
pass without running any tests. Set
{obj}--@rules_python//python/config_settings:validate_test_main=enabled to
fail the build when a test's main module only contains inert top-level
statements (definitions, imports, assignments) and never invokes a test
runner (#3824).
{#v2-2-0}
Configuration
📅 Schedule: (UTC)
- 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.
This PR was generated by Mend Renovate. View the repository job log.
Uh oh!
There was an error while loading. Please reload this page.
This PR contains the following updates:
2.2.0→2.3.3Release Notes
bazel-contrib/rules_python (rules_python)
v2.3.3Compare Source
{#v2-3-3-changed}
Changed
{#v2-3-3-fixed}
Fixed
generation for old-style namespace packages.
(#4135).
PyRuntimeInfowithfiles = Noneso creatingzipapp archives does not error.
{#v2-3-2}
v2.3.2Compare Source
{#v2-3-2-fixed}
Fixed
pip.parsefor source-less wheels withdependencies. (#4053)
pip_archiveand {obj}whl_archiverepository rules within the {obj}
whl_library. From now on we are dropping unsupported args.pip.parserepository names for Git sources inuv.lockfiles by excluding URL query and fragment components
(#4084).
{#v2-3-1}
v2.3.1Compare Source
{#v2-3-1-fixed}
Fixed
experimental repository cache users. This restores the previous behavior
(#3791).
{#v2-3-0}
v2.3.0Compare Source
{#v2-3-0-changed}
Changed
extension selects its standard library list on
is_python_3.14, which earlierversions do not define.
{#v2-3-0-fixed}
Fixed
py_binary_rule_builder()/py_test_rule_builder()(frompython/api/executables.bzl)failing at analysis time with a visibility error when used to construct a custom rule from an
external module.
dataattribute and forward itdirectly to the generated
py_binary, so files passed viadatacan bereferenced from
extra_argsusing$(location ...).coverage.pywheel is no longeremitted as we are now falling back to a pure python wheel
(#3950).
python_version3.13 and 3.14; previously both fell back to the 3.11 list, so modulesadded or removed since then (e.g.
compression.zstd,telnetlib) were misclassified. Thefallback list for unrecognized versions is now the newest available one rather than 3.11
(#3978).
uv_lockto be specified inpip.parsewithout requiringrequirements_lock(or other os-specific requirement file attributes) to beset.
(
pkg[extra]entries in a package's ownRequires-Dist). The loop comparedthe number of extras discovered in the current round against the number known
before it, rather than against the size of the merged set. As a result it
could stop before every extra was resolved, silently dropping dependencies
only reachable through two or more
pkg[extra]hops, and for the common caseof a package with no self-referencing extras it never converged at all,
running all 10000 rounds while evaluating each wheel's generated
BUILDfile(#4039).
--hash=<algo>:<digest>pins and Simple API#<algo>=<digest>URL fragments are now parsed for all hash algorithmsinstead of silently dropping everything except
sha256. Non-sha256 pins arematched against the digests advertised by the index and downloads are verified
using the corresponding Subresource Integrity value, and the pins are kept in
the requirement line when falling back to
pip(#3972).
As part of this,
whl_libraryrepos created bypip.parsenow always passthe digest via the
integrityattribute (SRI format) instead ofsha256,and the lock file facts store digests as
<algo>:<digest>values (the factsversion was bumped, so cached index information is refreshed once).
pip.parse(uv_lock = ...)no longer exposes uv workspace/root membersthat resolve to no wheel or sdist (e.g.
source = { virtual = "." }or editableinstalls). Previously these source-less packages were added to the hub's
all_requirements/all_whl_requirementswith an alias to a subpackage thatdoes not exist, breaking analysis for anything enumerating the full set such as
modules_mapping(wheels = all_whl_requirements)(#3934).
index_urlfor each wheel so that the source registry is forwarded tothe {obj}
whl_library. This is so that thepurlforpackage_metadatacan be correctlyconstructed.
enabling wheel sources files to point to an absolute path. Currently it supports
the
file://<absolute_path>for linux and windows like paths. We also supportenvsubst for the said paths from now on.
{#v2-3-0-added}
Added
build_python_zip,incompatible_default_to_explicit_init_py,python_path, andexperimental_python_import_all_repositories.{obj}explicit_init_pytag class to the `{obj}`configmodule extension for configuring implicit__init__.pyfilegeneration module-wide.
(#3997,
#2945)
py_extensionmacro for creating C/C++ Pythonextension modules
(#3283).
(cc) Added
libc,platform_machine,platform_tag,soabi, andsys_platformattributes and info fields to {obj}py_cc_toolchain/{obj}
PyCcToolchainInfo.pyproject_tomlattribute to {obj}pip.default, {obj}pip.parseand {obj}python.defaultsto read the default Python version from therequires-pythonfield ofpyproject.toml.py_testtargets that silentlypass without running any tests. Set
{obj}
--@rules_python//python/config_settings:validate_test_main=enabledtofail the build when a test's main module only contains inert top-level
statements (definitions, imports, assignments) and never invokes a test
runner (#3824).
{#v2-2-0}
Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.