Prepare release v2.5.0 (#4389) Work towards #4388 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
diff --git a/CHANGELOG.md b/CHANGELOG.md index 867e968..ae34d51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md
@@ -29,6 +29,145 @@ directory, or view the [latest generated changelog](https://rules-python.readthedocs.io/en/latest/changelog.html). +{#v2-5-0} +## [2.5.0] - 2026-10-31 + +[2.5.0]: https://github.com/bazel-contrib/rules_python/releases/tag/2.5.0 + +{#v2-5-0-changed} +### Changed +* (gazelle) Migrated the Python AST parser from `smacker/go-tree-sitter` to the + official `tree-sitter/go-tree-sitter` and `tree-sitter/tree-sitter-python` + packages, adding support for Python 3.14 PEP 758 unparenthesized exception + clauses ([#3416](https://github.com/bazel-contrib/rules_python/issues/3416)). +* (pypi) Downloaded wheels are removed after extraction when their original + archive can be fetched independently. The existing `whl` and `whl_file` targets + fetch the archive from a separate repository on demand. Matching patches are + applied in the separate wheel-file repository, which also supplies the patched + archive for extraction. Wheels built from source retain their existing archive + behavior. +* (rules) {obj}`py_console_script_binary` now creates the main script only for the `exec` + configuration. +* (toolchains) Added `install_only_stripped` python-build-standalone runtime + archives for releases from `20240726` onward. They can be used by setting + {obj}`--@rules_python//python/config_settings:py_pbs_distribution` to + `install_only_stripped` to reduce runtime download size. + ([#4163](https://github.com/bazel-contrib/rules_python/issues/4163)) +* (toolchains) Downloaded runtimes cache pyc files under `$HOME/.cache` + (`LOCALAPPDATA` on Windows) instead of a temporary directory when + `XDG_CACHE_HOME` is unset + ([#4198](https://github.com/bazel-contrib/rules_python/issues/4198)). +* (uv) The default `uv` version has been bumped from `0.11.2` to `0.13.1`. This + lets the {obj}`lock` rule use scoped `override-dependencies` from a + `pyproject.toml` in `[tool.uv]`, which require `uv` `0.11.25` or newer. + ([#2992](https://github.com/bazel-contrib/rules_python/issues/2992)) + +{#v2-5-0-fixed} +### Fixed +* (`uv`) Support executable wrappers with multiple outputs and preserve their + runfiles in lock actions and runnable targets. Export downloaded `uv` binaries + so wrappers can declare them as dependencies. + ([#4181](https://github.com/bazel-contrib/rules_python/issues/4181)) +* (bzlmod) Fixed configuring and using Python patch versions newer than the + built-in `MINOR_MAPPING` in the {obj}`python` and {obj}`pip` extensions, + including `add_runtime_manifest_files` download URLs and host interpreter + resolution ([#4358](https://github.com/bazel-contrib/rules_python/issues/4358)). +* (gazelle) Check in a default standard library module list (`stdlib_list/default.txt`) + alongside the Bazel-selected list (`stdlib_list/selected.txt`) so + `github.com/bazel-contrib/rules_python/gazelle/python` can be built and tested + directly with standard Go tooling (`go build`, `go test`, `go list`) outside + Bazel ([#3821](https://github.com/bazel-contrib/rules_python/issues/3821)). +* (gazelle) Fixed Python targets with an `imports` attribute not being deleted + when their source files are removed + ([#4282](https://github.com/bazel-contrib/rules_python/issues/4282)). +* (pypi) A {obj}`pip.parse` call for a Python version that has no interpreter for + the host platform is now skipped, like a version with no registered toolchain, + instead of failing the whole {obj}`pip` extension. A dependency that lists, + say, Python 3.9 no longer breaks every other hub on hosts that have no CPython + 3.9 build, such as Windows on ARM64 + ([#4184](https://github.com/bazel-contrib/rules_python/issues/4184)). +* (pypi) Wheel namespace package initializers no longer require a shell or `cp` on the execution platform. +* (pypi) `pip.parse(uv_lock = ...)` now builds packages with a git source with + `pip`, from a `name @ git+<url>@<commit>` direct reference pinned to the commit + `uv` resolved, instead of passing the uv.lock source string to the Bazel + downloader as a URL. + ([#4139](https://github.com/bazel-contrib/rules_python/issues/4139)) +* (rules) Fixed stage 1 bootstrap script failing when the executable path, + runfiles root, or `RULES_PYTHON_EXTRACT_ROOT` contains spaces + ([#4386](https://github.com/bazel-contrib/rules_python/pull/4386)). +* (rules) Fixed {obj}`py_library.pyi_deps` being included in runtime output and + bloating output. Type-checking only information is now in + {obj}`PyInfo.type_checking_info`. Added the + {obj}`--//python/config_settings:pyi_deps_to_runfiles` flag to configure or + restore legacy runfile propagation if needed + ([#4178](https://github.com/bazel-contrib/rules_python/pull/4178)). +* (sphinxdocs) Fixed `sphinx_docs` `.run` targets failing to locate the `sphinx` + binary when defined in the root package + ([#4201](https://github.com/bazel-contrib/rules_python/issues/4201)). +* (toolchains) Evaluating the {obj}`python` module extension and `@pythons_hub` + repository no longer materializes the `@rules_python` repository when using + `--experimental_remote_repo_contents_cache` + ([#4294](https://github.com/bazel-contrib/rules_python/issues/4294)). +* (toolchains) Fixed build tools, such as the precompiler, running with the + default Python version instead of the target's Python version under Bazel 10 + ([#3566](https://github.com/bazel-contrib/rules_python/issues/3566)). +* (toolchains) The `python` extension is re-evaluated when the host OS or CPU + changes, so an output base shared between hosts no longer fails to fetch the + `*_host` interpreter repo. +* (toolchains) `__pycache__` symlinks in downloaded runtimes no longer end up in + runfiles, and a runtime no longer loads pyc files compiled from another + version's sources + ([#4198](https://github.com/bazel-contrib/rules_python/issues/4198)). +* (uv) Fixed {obj}`lock`'s `.run` target for `uv.lock` outputs to read and write + the lock file in the workspace source tree instead of the runfiles tree + ([#4339](https://github.com/bazel-contrib/rules_python/issues/4339)). +* (uv) The {obj}`lock` macro's `.run` target uses the `uv` cache and honors + `UV_CACHE_DIR` and `UV_NO_CACHE`. Pass `--refresh` to refresh cached data or + `--no-cache` to disable caching. Lock build actions, including those used by + `.update`, disable the `uv` cache. + ([#4179](https://github.com/bazel-contrib/rules_python/issues/4179)) +* (zipapp) Forwarded termination signals to the application, preserved inherited + ignored signals and exit status, and cleaned up temporary extraction directories. + ([#3809](https://github.com/bazel-contrib/rules_python/issues/3809)) + +{#v2-5-0-added} +### Added +* (packaging) {obj}`py_wheel` now expands Python toolchain make variables by + default and in `platform` and `python_requires`. {obj}`py_runtime_pair` and + {obj}`current_py_toolchain` now provide version and wheel tag make variables. +* (pypi) Added `pip.default(unified_hub_requirements_bzl = True)`, which makes the + unified `@pypi` hub generate a `requirements.bzl` with the per-package macros of + a concrete hub's (`requirement`, `whl_requirement`, `data_requirement` and + `dist_info_requirement`). A repo that renames its hub away from the reserved + `pypi` name keeps its `load("@pypi//:requirements.bzl", "requirement")` users + working, and the returned labels route through + {obj}`--@rules_python//python/config_settings:venv`. The `all_*` lists are not + provided, since they could only list one hub's packages; load them from a + concrete hub. +* (rules) Added {obj}`PyInfo.direct_implicit_pyc_files` and + {obj}`PyExecutableInfo.venv_runfiles`. +* (rules) Added {obj}`pytest_test`, which facilitates running of pytest tests. + It supports generating multiple test targets for more than one Python version + and uses `pytest-randomly` and `pytest-shard`. + ([#3594](https://github.com/bazel-contrib/rules_python/issues/3594)) +* (toolchains) Added the + {obj}`--@rules_python//python/config_settings:py_pbs_distribution` + flag to select which python-build-standalone archive the hermetic toolchains + use. Setting it to `install_only_stripped` uses runtimes without debug symbols, + which reduces runtime and zipapp size. + ([#4163](https://github.com/bazel-contrib/rules_python/issues/4163)) +* (uv) Added `@uv//:uv`, {obj}`//python/uv/bin:uv`, and public visibility on + {obj}`//python/uv:current_toolchain` (along with the `$(UV)` make variable) to + run the configured `uv` binary directly (e.g. + `bazel run @rules_python//python/uv/bin:uv -- --help` or + `bazel run @uv -- --help`) + ([#4371](https://github.com/bazel-contrib/rules_python/pull/4371)). +* (uv) The {obj}`lock` macro now works in WORKSPACE builds; set up the `uv` + toolchains with the new {obj}`uv_toolchains_manifest` repository rule and + {obj}`uv_register_toolchains` macro. + ([#1975](https://github.com/bazel-contrib/rules_python/issues/1975)) + + {#v2-4-6} ## [2.4.6] - 2026-10-29
diff --git a/docs/api/rules_python/python/config_settings/index.md b/docs/api/rules_python/python/config_settings/index.md index 2def823..4d9169a 100644 --- a/docs/api/rules_python/python/config_settings/index.md +++ b/docs/api/rules_python/python/config_settings/index.md
@@ -254,7 +254,7 @@ * `yes`: Propagate `pyi_deps` into runtime runfiles (legacy behavior). * `no`: Do not propagate `pyi_deps` into runtime runfiles. -:::{versionadded} VERSION_NEXT_FEATURE +:::{versionadded} 2.5.0 ::: :::: @@ -333,7 +333,7 @@ See {ref}`Selecting the runtime archive <selecting-the-runtime-archive>` for details. -:::{versionadded} VERSION_NEXT_FEATURE +:::{versionadded} 2.5.0 ::: ::::
diff --git a/docs/api/rules_python/python/uv/bin/index.md b/docs/api/rules_python/python/uv/bin/index.md index cb3a914..c879bcb 100644 --- a/docs/api/rules_python/python/uv/bin/index.md +++ b/docs/api/rules_python/python/uv/bin/index.md
@@ -19,6 +19,6 @@ bazel run @rules_python//python/uv/bin:uv -- --help ``` -:::{versionadded} VERSION_NEXT_FEATURE +:::{versionadded} 2.5.0 ::: ::::
diff --git a/docs/api/rules_python/python/uv/index.md b/docs/api/rules_python/python/uv/index.md index 6523689..6724ff7 100644 --- a/docs/api/rules_python/python/uv/index.md +++ b/docs/api/rules_python/python/uv/index.md
@@ -34,7 +34,7 @@ ) ``` -:::{versionadded} VERSION_NEXT_FEATURE +:::{versionadded} 2.5.0 ::: ::::
diff --git a/docs/environment-variables.md b/docs/environment-variables.md index b818ade..8ac7a93 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md
@@ -115,7 +115,7 @@ If `/dev/null` (`NUL` on Windows) is specified, or if a directory cannot be found or created, then pyc caching will be disabled. -:::{versionchanged} VERSION_NEXT_PATCH +:::{versionchanged} 2.5.0 Temporary directories (`TMP`, `TEMP`, `/tmp` and `C:\Temp`) are no longer used. They get cleaned out while the fetched runtime persists, which left the `__pycache__` symlinks dangling.
diff --git a/news/1975.added.md b/news/1975.added.md deleted file mode 100644 index 36487e6..0000000 --- a/news/1975.added.md +++ /dev/null
@@ -1,4 +0,0 @@ -(uv) The {obj}`lock` macro now works in WORKSPACE builds; set up the `uv` -toolchains with the new {obj}`uv_toolchains_manifest` repository rule and -{obj}`uv_register_toolchains` macro. -([#1975](https://github.com/bazel-contrib/rules_python/issues/1975))
diff --git a/news/2992.changed.md b/news/2992.changed.md deleted file mode 100644 index bdf43b9..0000000 --- a/news/2992.changed.md +++ /dev/null
@@ -1,4 +0,0 @@ -(uv) The default `uv` version has been bumped from `0.11.2` to `0.13.1`. This -lets the {obj}`lock` rule use scoped `override-dependencies` from a -`pyproject.toml` in `[tool.uv]`, which require `uv` `0.11.25` or newer. -([#2992](https://github.com/bazel-contrib/rules_python/issues/2992))
diff --git a/news/3416.changed.md b/news/3416.changed.md deleted file mode 100644 index 5aab21b..0000000 --- a/news/3416.changed.md +++ /dev/null
@@ -1,4 +0,0 @@ -(gazelle) Migrated the Python AST parser from `smacker/go-tree-sitter` to the -official `tree-sitter/go-tree-sitter` and `tree-sitter/tree-sitter-python` -packages, adding support for Python 3.14 PEP 758 unparenthesized exception -clauses ([#3416](https://github.com/bazel-contrib/rules_python/issues/3416)).
diff --git a/news/3566.fixed.md b/news/3566.fixed.md deleted file mode 100644 index 301765b..0000000 --- a/news/3566.fixed.md +++ /dev/null
@@ -1,3 +0,0 @@ -(toolchains) Fixed build tools, such as the precompiler, running with the -default Python version instead of the target's Python version under Bazel 10 -([#3566](https://github.com/bazel-contrib/rules_python/issues/3566)).
diff --git a/news/3757-provider-fields.added.md b/news/3757-provider-fields.added.md deleted file mode 100644 index f854306..0000000 --- a/news/3757-provider-fields.added.md +++ /dev/null
@@ -1,2 +0,0 @@ -(rules) Added {obj}`PyInfo.direct_implicit_pyc_files` and -{obj}`PyExecutableInfo.venv_runfiles`.
diff --git a/news/3809.fixed.md b/news/3809.fixed.md deleted file mode 100644 index f8c6d09..0000000 --- a/news/3809.fixed.md +++ /dev/null
@@ -1,3 +0,0 @@ -(zipapp) Forwarded termination signals to the application, preserved inherited -ignored signals and exit status, and cleaned up temporary extraction directories. -([#3809](https://github.com/bazel-contrib/rules_python/issues/3809))
diff --git a/news/3821.fixed.md b/news/3821.fixed.md deleted file mode 100644 index a880d13..0000000 --- a/news/3821.fixed.md +++ /dev/null
@@ -1,5 +0,0 @@ -(gazelle) Check in a default standard library module list (`stdlib_list/default.txt`) -alongside the Bazel-selected list (`stdlib_list/selected.txt`) so -`github.com/bazel-contrib/rules_python/gazelle/python` can be built and tested -directly with standard Go tooling (`go build`, `go test`, `go list`) outside -Bazel ([#3821](https://github.com/bazel-contrib/rules_python/issues/3821)).
diff --git a/news/4139.fixed.md b/news/4139.fixed.md deleted file mode 100644 index 589812e..0000000 --- a/news/4139.fixed.md +++ /dev/null
@@ -1,5 +0,0 @@ -(pypi) `pip.parse(uv_lock = ...)` now builds packages with a git source with -`pip`, from a `name @ git+<url>@<commit>` direct reference pinned to the commit -`uv` resolved, instead of passing the uv.lock source string to the Bazel -downloader as a URL. -([#4139](https://github.com/bazel-contrib/rules_python/issues/4139))
diff --git a/news/4163.added.md b/news/4163.added.md deleted file mode 100644 index 926efe8..0000000 --- a/news/4163.added.md +++ /dev/null
@@ -1,6 +0,0 @@ -(toolchains) Added the -{obj}`--@rules_python//python/config_settings:py_pbs_distribution` -flag to select which python-build-standalone archive the hermetic toolchains -use. Setting it to `install_only_stripped` uses runtimes without debug symbols, -which reduces runtime and zipapp size. -([#4163](https://github.com/bazel-contrib/rules_python/issues/4163))
diff --git a/news/4163.changed.md b/news/4163.changed.md deleted file mode 100644 index 74bdc17..0000000 --- a/news/4163.changed.md +++ /dev/null
@@ -1,5 +0,0 @@ -(toolchains) Added `install_only_stripped` python-build-standalone runtime -archives for releases from `20240726` onward. They can be used by setting -{obj}`--@rules_python//python/config_settings:py_pbs_distribution` to -`install_only_stripped` to reduce runtime download size. -([#4163](https://github.com/bazel-contrib/rules_python/issues/4163))
diff --git a/news/4178.fixed.md b/news/4178.fixed.md deleted file mode 100644 index b96863b..0000000 --- a/news/4178.fixed.md +++ /dev/null
@@ -1,6 +0,0 @@ -(rules) Fixed {obj}`py_library.pyi_deps` being included in runtime output and -bloating output. Type-checking only information is now in -{obj}`PyInfo.type_checking_info`. Added the -{obj}`--//python/config_settings:pyi_deps_to_runfiles` flag to configure or -restore legacy runfile propagation if needed -([#4178](https://github.com/bazel-contrib/rules_python/pull/4178)).
diff --git a/news/4179.fixed.md b/news/4179.fixed.md deleted file mode 100644 index 3225cfb..0000000 --- a/news/4179.fixed.md +++ /dev/null
@@ -1,5 +0,0 @@ -(uv) The {obj}`lock` macro's `.run` target uses the `uv` cache and honors -`UV_CACHE_DIR` and `UV_NO_CACHE`. Pass `--refresh` to refresh cached data or -`--no-cache` to disable caching. Lock build actions, including those used by -`.update`, disable the `uv` cache. -([#4179](https://github.com/bazel-contrib/rules_python/issues/4179))
diff --git a/news/4181.fixed.md b/news/4181.fixed.md deleted file mode 100644 index 1323770..0000000 --- a/news/4181.fixed.md +++ /dev/null
@@ -1,4 +0,0 @@ -(`uv`) Support executable wrappers with multiple outputs and preserve their -runfiles in lock actions and runnable targets. Export downloaded `uv` binaries -so wrappers can declare them as dependencies. -([#4181](https://github.com/bazel-contrib/rules_python/issues/4181))
diff --git a/news/4184.fixed.md b/news/4184.fixed.md deleted file mode 100644 index edd4167..0000000 --- a/news/4184.fixed.md +++ /dev/null
@@ -1,6 +0,0 @@ -(pypi) A {obj}`pip.parse` call for a Python version that has no interpreter for -the host platform is now skipped, like a version with no registered toolchain, -instead of failing the whole {obj}`pip` extension. A dependency that lists, -say, Python 3.9 no longer breaks every other hub on hosts that have no CPython -3.9 build, such as Windows on ARM64 -([#4184](https://github.com/bazel-contrib/rules_python/issues/4184)).
diff --git a/news/4198.changed.md b/news/4198.changed.md deleted file mode 100644 index 542d03f..0000000 --- a/news/4198.changed.md +++ /dev/null
@@ -1,4 +0,0 @@ -(toolchains) Downloaded runtimes cache pyc files under `$HOME/.cache` -(`LOCALAPPDATA` on Windows) instead of a temporary directory when -`XDG_CACHE_HOME` is unset -([#4198](https://github.com/bazel-contrib/rules_python/issues/4198)).
diff --git a/news/4198.fixed.md b/news/4198.fixed.md deleted file mode 100644 index bed5287..0000000 --- a/news/4198.fixed.md +++ /dev/null
@@ -1,4 +0,0 @@ -(toolchains) `__pycache__` symlinks in downloaded runtimes no longer end up in -runfiles, and a runtime no longer loads pyc files compiled from another -version's sources -([#4198](https://github.com/bazel-contrib/rules_python/issues/4198)).
diff --git a/news/4201.fixed.md b/news/4201.fixed.md deleted file mode 100644 index f686516..0000000 --- a/news/4201.fixed.md +++ /dev/null
@@ -1,3 +0,0 @@ -(sphinxdocs) Fixed `sphinx_docs` `.run` targets failing to locate the `sphinx` -binary when defined in the root package -([#4201](https://github.com/bazel-contrib/rules_python/issues/4201)).
diff --git a/news/4219.changed.md b/news/4219.changed.md deleted file mode 100644 index bf20cf3..0000000 --- a/news/4219.changed.md +++ /dev/null
@@ -1,2 +0,0 @@ -(rules) {obj}`py_console_script_binary` now creates the main script only for the `exec` -configuration.
diff --git a/news/4223.added.md b/news/4223.added.md deleted file mode 100644 index de37e0e..0000000 --- a/news/4223.added.md +++ /dev/null
@@ -1,9 +0,0 @@ -(pypi) Added `pip.default(unified_hub_requirements_bzl = True)`, which makes the -unified `@pypi` hub generate a `requirements.bzl` with the per-package macros of -a concrete hub's (`requirement`, `whl_requirement`, `data_requirement` and -`dist_info_requirement`). A repo that renames its hub away from the reserved -`pypi` name keeps its `load("@pypi//:requirements.bzl", "requirement")` users -working, and the returned labels route through -{obj}`--@rules_python//python/config_settings:venv`. The `all_*` lists are not -provided, since they could only list one hub's packages; load them from a -concrete hub.
diff --git a/news/4244.added.md b/news/4244.added.md deleted file mode 100644 index e749f2f..0000000 --- a/news/4244.added.md +++ /dev/null
@@ -1,4 +0,0 @@ -(rules) Added {obj}`pytest_test`, which facilitates running of pytest tests. -It supports generating multiple test targets for more than one Python version -and uses `pytest-randomly` and `pytest-shard`. -([#3594](https://github.com/bazel-contrib/rules_python/issues/3594))
diff --git a/news/4282.fixed.md b/news/4282.fixed.md deleted file mode 100644 index d2ef1d9..0000000 --- a/news/4282.fixed.md +++ /dev/null
@@ -1,3 +0,0 @@ -(gazelle) Fixed Python targets with an `imports` attribute not being deleted -when their source files are removed -([#4282](https://github.com/bazel-contrib/rules_python/issues/4282)).
diff --git a/news/4294.fixed.md b/news/4294.fixed.md deleted file mode 100644 index 81507c5..0000000 --- a/news/4294.fixed.md +++ /dev/null
@@ -1,4 +0,0 @@ -(toolchains) Evaluating the {obj}`python` module extension and `@pythons_hub` -repository no longer materializes the `@rules_python` repository when using -`--experimental_remote_repo_contents_cache` -([#4294](https://github.com/bazel-contrib/rules_python/issues/4294)).
diff --git a/news/4339.fixed.md b/news/4339.fixed.md deleted file mode 100644 index 17fa931..0000000 --- a/news/4339.fixed.md +++ /dev/null
@@ -1,3 +0,0 @@ -(uv) Fixed {obj}`lock`'s `.run` target for `uv.lock` outputs to read and write -the lock file in the workspace source tree instead of the runfiles tree -([#4339](https://github.com/bazel-contrib/rules_python/issues/4339)).
diff --git a/news/4358.fixed.md b/news/4358.fixed.md deleted file mode 100644 index f8ea0c2..0000000 --- a/news/4358.fixed.md +++ /dev/null
@@ -1,4 +0,0 @@ -(bzlmod) Fixed configuring and using Python patch versions newer than the -built-in `MINOR_MAPPING` in the {obj}`python` and {obj}`pip` extensions, -including `add_runtime_manifest_files` download URLs and host interpreter -resolution ([#4358](https://github.com/bazel-contrib/rules_python/issues/4358)).
diff --git a/news/4386.fixed.md b/news/4386.fixed.md deleted file mode 100644 index 877e3e5..0000000 --- a/news/4386.fixed.md +++ /dev/null
@@ -1,3 +0,0 @@ -(rules) Fixed stage 1 bootstrap script failing when the executable path, -runfiles root, or `RULES_PYTHON_EXTRACT_ROOT` contains spaces -([#4386](https://github.com/bazel-contrib/rules_python/pull/4386)).
diff --git a/news/lazy-wheel-archives.changed.md b/news/lazy-wheel-archives.changed.md deleted file mode 100644 index 08226ef..0000000 --- a/news/lazy-wheel-archives.changed.md +++ /dev/null
@@ -1,6 +0,0 @@ -(pypi) Downloaded wheels are removed after extraction when their original -archive can be fetched independently. The existing `whl` and `whl_file` targets -fetch the archive from a separate repository on demand. Matching patches are -applied in the separate wheel-file repository, which also supplies the patched -archive for extraction. Wheels built from source retain their existing archive -behavior.
diff --git a/news/py-wheel-makevars.added.md b/news/py-wheel-makevars.added.md deleted file mode 100644 index 2ae604c..0000000 --- a/news/py-wheel-makevars.added.md +++ /dev/null
@@ -1,3 +0,0 @@ -(packaging) {obj}`py_wheel` now expands Python toolchain make variables by -default and in `platform` and `python_requires`. {obj}`py_runtime_pair` and -{obj}`current_py_toolchain` now provide version and wheel tag make variables.
diff --git a/news/python-ext-os-arch-dependent.fixed.md b/news/python-ext-os-arch-dependent.fixed.md deleted file mode 100644 index ea17098..0000000 --- a/news/python-ext-os-arch-dependent.fixed.md +++ /dev/null
@@ -1,3 +0,0 @@ -(toolchains) The `python` extension is re-evaluated when the host OS or CPU -changes, so an output base shared between hosts no longer fails to fetch the -`*_host` interpreter repo.
diff --git a/news/uv-bin-target.added.md b/news/uv-bin-target.added.md deleted file mode 100644 index c3142dc..0000000 --- a/news/uv-bin-target.added.md +++ /dev/null
@@ -1,6 +0,0 @@ -(uv) Added `@uv//:uv`, {obj}`//python/uv/bin:uv`, and public visibility on -{obj}`//python/uv:current_toolchain` (along with the `$(UV)` make variable) to -run the configured `uv` binary directly (e.g. -`bazel run @rules_python//python/uv/bin:uv -- --help` or -`bazel run @uv -- --help`) -([#4371](https://github.com/bazel-contrib/rules_python/pull/4371)).
diff --git a/news/wheel-namespace-initializers.fixed.md b/news/wheel-namespace-initializers.fixed.md deleted file mode 100644 index 1edbf74..0000000 --- a/news/wheel-namespace-initializers.fixed.md +++ /dev/null
@@ -1 +0,0 @@ -(pypi) Wheel namespace package initializers no longer require a shell or `cp` on the execution platform.
diff --git a/python/current_py_toolchain.bzl b/python/current_py_toolchain.bzl index 0e7ab68..e422b4e 100644 --- a/python/current_py_toolchain.bzl +++ b/python/current_py_toolchain.bzl
@@ -70,7 +70,7 @@ respectively. ::: - :::{versionchanged} VERSION_NEXT_FEATURE + :::{versionchanged} 2.5.0 Exposes make variables from the underlying toolchain's `template_vars` (see {rule}`py_runtime_pair`). :::
diff --git a/python/private/py_executable_info.bzl b/python/private/py_executable_info.bzl index 2a6ccfe..eaf8c0f 100644 --- a/python/private/py_executable_info.bzl +++ b/python/private/py_executable_info.bzl
@@ -127,7 +127,7 @@ files and the symlinks to the application's dependencies. A subset of {obj}`app_runfiles`. May be None if venv mode is not enabled. -:::{versionadded} VERSION_NEXT_FEATURE +:::{versionadded} 2.5.0 ::: """, },
diff --git a/python/private/py_info.bzl b/python/private/py_info.bzl index 4bda560..baaace1 100644 --- a/python/private/py_info.bzl +++ b/python/private/py_info.bzl
@@ -434,7 +434,7 @@ The automatically generated pyc files that are directly provided by the target. The direct counterpart of {obj}`transitive_implicit_pyc_files`. -::::{versionadded} VERSION_NEXT_FEATURE +::::{versionadded} 2.5.0 :::: """, "direct_original_sources": """ @@ -583,7 +583,7 @@ output of a program. Type checkers should merge this into their information to augment the analyzed output. -::::{versionadded} VERSION_NEXT_FEATURE +::::{versionadded} 2.5.0 :::: """, "uses_shared_libraries": """ @@ -664,7 +664,7 @@ Builder for {obj}`PyInfo.type_checking_info`. `None` on nested type-checking builders. - ::::{versionadded} VERSION_NEXT_FEATURE + ::::{versionadded} 2.5.0 :::: ::: @@ -927,7 +927,7 @@ `type_checking_info`) into {obj}`type_checking_info`, excluding runtime fields like `imports` and `transitive_sources` from the top-level `PyInfo`. - :::{versionadded} VERSION_NEXT_FEATURE + :::{versionadded} 2.5.0 ::: Args:
diff --git a/python/private/py_runtime_pair_rule.bzl b/python/private/py_runtime_pair_rule.bzl index c339e0b..1ecf399 100644 --- a/python/private/py_runtime_pair_rule.bzl +++ b/python/private/py_runtime_pair_rule.bzl
@@ -214,7 +214,7 @@ register_toolchains("//my_pkg:my_toolchain") ``` -:::{versionchanged} VERSION_NEXT_FEATURE +:::{versionchanged} 2.5.0 Provides `TemplateVariableInfo` and `ToolchainInfo.template_vars`. ::: """,
diff --git a/python/private/py_wheel.bzl b/python/private/py_wheel.bzl index c44623f..cfbbd59 100644 --- a/python/private/py_wheel.bzl +++ b/python/private/py_wheel.bzl
@@ -43,7 +43,7 @@ Supports make variables, e.g. `abi = "$(PY_WHEEL_ABI_TAG)"`. See {rule}`py_runtime_pair` for variables provided by the Python toolchain. -:::{versionchanged} VERSION_NEXT_FEATURE +:::{versionchanged} 2.5.0 Python toolchain make variables (such as `$(PY_WHEEL_ABI_TAG)`) are available by default. ::: @@ -89,7 +89,7 @@ Supports make variables. -:::{versionchanged} VERSION_NEXT_FEATURE +:::{versionchanged} 2.5.0 Supports make variables. ::: """, @@ -102,7 +102,7 @@ Supports make variables, e.g. `python_tag = "$(PY_WHEEL_PYTHON_TAG)"`. See {rule}`py_runtime_pair` for variables provided by the Python toolchain. -:::{versionchanged} VERSION_NEXT_FEATURE +:::{versionchanged} 2.5.0 Python toolchain make variables (such as `$(PY_WHEEL_PYTHON_TAG)`) are available by default. ::: @@ -290,7 +290,7 @@ Supports make variables, e.g. `python_requires = "==$(PY_MAJOR_DOT_MINOR).*"`. See {rule}`py_runtime_pair` for variables provided by the Python toolchain. -:::{versionchanged} VERSION_NEXT_FEATURE +:::{versionchanged} 2.5.0 Supports make variables. ::: """,
diff --git a/python/private/pypi/extension.bzl b/python/private/pypi/extension.bzl index 1b82780..5a57114 100644 --- a/python/private/pypi/extension.bzl +++ b/python/private/pypi/extension.bzl
@@ -777,7 +777,7 @@ Only the root module's value is used. -:::{versionadded} VERSION_NEXT_FEATURE +:::{versionadded} 2.5.0 ::: """, ),
diff --git a/python/private/pytest_test/pytest_test.bzl b/python/private/pytest_test/pytest_test.bzl index 511c72d..5e66bfd 100644 --- a/python/private/pytest_test/pytest_test.bzl +++ b/python/private/pytest_test/pytest_test.bzl
@@ -19,7 +19,7 @@ **kwargs): """Run pytest tests. - :::{versionadded} VERSION_NEXT_FEATURE + :::{versionadded} 2.5.0 ::: Args:
diff --git a/python/pytest_test.bzl b/python/pytest_test.bzl index be24e40..52facab 100644 --- a/python/pytest_test.bzl +++ b/python/pytest_test.bzl
@@ -9,7 +9,7 @@ * `pytest-randomly` - used to have consistent random number usage. * `pytest-shard` - optional, used only if tests need to be sharded. -:::{versionadded} VERSION_NEXT_FEATURE +:::{versionadded} 2.5.0 ::: """
diff --git a/python/uv/private/lock.bzl b/python/uv/private/lock.bzl index ddb60d0..d50b299 100644 --- a/python/uv/private/lock.bzl +++ b/python/uv/private/lock.bzl
@@ -660,11 +660,11 @@ extension, under WORKSPACE via {obj}`uv_register_toolchains`. ::: - :::{versionchanged} VERSION_NEXT_PATCH + :::{versionchanged} 2.5.0 The `name.run` target uses the `uv` cache by default. ::: - :::{versionchanged} VERSION_NEXT_FEATURE + :::{versionchanged} 2.5.0 WORKSPACE builds are supported; previously the targets were marked incompatible unless bzlmod was enabled. :::
diff --git a/python/uv/private/uv.bzl b/python/uv/private/uv.bzl index 32462c0..9919e21 100644 --- a/python/uv/private/uv.bzl +++ b/python/uv/private/uv.bzl
@@ -46,7 +46,7 @@ Since this is only for locking the requirements files, it should be always marked as a `dev_dependency`. -:::{versionchanged} VERSION_NEXT_FEATURE +:::{versionchanged} 2.5.0 Added `@uv//:uv` and {obj}`//python/uv/bin:uv` (aliases for {obj}`//python/uv:current_toolchain`) to run the configured `uv` binary directly. @@ -95,7 +95,7 @@ doc = """ Set the uv configuration defaults. -:::{versionchanged} VERSION_NEXT_PATCH +:::{versionchanged} 2.5.0 `netrc` and `auth_patterns` now apply to the versions configured with {obj}`uv.configure`; previously they were accepted but ignored. :::
diff --git a/python/uv/private/uv_register_toolchains.bzl b/python/uv/private/uv_register_toolchains.bzl index 558d6d4..4479445 100644 --- a/python/uv/private/uv_register_toolchains.bzl +++ b/python/uv/private/uv_register_toolchains.bzl
@@ -160,7 +160,7 @@ targets in your own repository. ::: - :::{versionadded} VERSION_NEXT_FEATURE + :::{versionadded} 2.5.0 ::: Args:
diff --git a/python/uv/private/uv_toolchain.bzl b/python/uv/private/uv_toolchain.bzl index c2e6a89..b09c372 100644 --- a/python/uv/private/uv_toolchain.bzl +++ b/python/uv/private/uv_toolchain.bzl
@@ -49,7 +49,7 @@ The `uv` executable or a wrapper that forwards its arguments to `uv`. Runtime dependencies belong in the executable target's runfiles. -:::{versionchanged} VERSION_NEXT_PATCH +:::{versionchanged} 2.5.0 Executable targets with multiple output files are supported. Lock actions and runnable targets include the executable target's runfiles. :::
diff --git a/python/uv/private/uv_toolchains_manifest.bzl b/python/uv/private/uv_toolchains_manifest.bzl index b55d32f..6b912eb 100644 --- a/python/uv/private/uv_toolchains_manifest.bzl +++ b/python/uv/private/uv_toolchains_manifest.bzl
@@ -121,7 +121,7 @@ different places can be fetched with one repository each and combined with the `manifests` argument of {obj}`uv_register_toolchains`. -:::{versionadded} VERSION_NEXT_FEATURE +:::{versionadded} 2.5.0 ::: """, attrs = {