Skip to content

Commit 6f65150

Browse files
Prepare release v2.4.0 (#4176)
Work towards #4175 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 40ea02e commit 6f65150

24 files changed

Lines changed: 71 additions & 56 deletions

‎CHANGELOG.md‎

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,69 @@ Unreleased changes are tracked as individual files in the [news/](./news)
2929
directory, or view the [latest generated
3030
changelog](https://rules-python.readthedocs.io/en/latest/changelog.html).
3131

32+
{#v2-4-0}
33+
## [2.4.0] - 2026-09-22
34+
35+
[2.4.0]: https://github.com/bazel-contrib/rules_python/releases/tag/2.4.0
36+
37+
{#v2-4-0-changed}
38+
### Changed
39+
* (bootstrap) {obj}`sys.path` adds the Python runtime in runfiles instead
40+
of the underlying Bazel repository cache directory
41+
([#4104](https://github.com/bazel-contrib/rules_python/pull/4104)).
42+
* (gazelle) Deprecate the `requirements` argument of `gazelle_python_manifest`
43+
in favor of the format-agnostic `lockfiles` argument, which supports `uv.lock`.
44+
* (toolchain) Updated default Python 3.15 runtime from `3.15.0a8` to `3.15.0rc1`
45+
([#4122](https://github.com/bazel-contrib/rules_python/pull/4122)).
46+
* (toolchain) Updated the default Python toolchain version from `3.11` to `3.14`
47+
in {obj}`python.defaults`, {obj}`python_register_toolchains`, and
48+
{obj}`python_register_multi_toolchains`
49+
([#4023](https://github.com/bazel-contrib/rules_python/pull/4023)).
50+
51+
{#v2-4-0-fixed}
52+
### Fixed
53+
* Include the Python toolchain's static libraries when `current_py_cc_libs` is used
54+
as a dependency of `cc_shared_library`.
55+
* (bzlmod) Fixed a type mismatch error when using {obj}`coverage_tool` with
56+
{obj}`python.single_version_platform_override`
57+
([#2570](https://github.com/bazel-contrib/rules_python/issues/2570)).
58+
* (precompile) Fixed handling of directory and `.pyc` file inputs in
59+
{obj}`srcs` when {obj}`precompile` is enabled on {obj}`py_library`,
60+
{obj}`py_binary`, and {obj}`py_test` targets
61+
([#4113](https://github.com/bazel-contrib/rules_python/pull/4113)).
62+
* (pypi) Fixed wheel RECORD file generation on Windows so that rewritten shebang
63+
scripts correctly include the `.bat` extension
64+
([#4114](https://github.com/bazel-contrib/rules_python/pull/4114)).
65+
* (pypi) Fixed {obj}`RECORD` file paths for extracted `.data` directory contents
66+
so that {obj}`importlib.metadata.files()` correctly locates installed
67+
distribution files ([#4025](https://github.com/bazel-contrib/rules_python/pull/4025)).
68+
* (pypi) Venv mode now works on NixOS and no longer requires coreutils to process
69+
wheel scripts and RECORD files
70+
([#4125](https://github.com/bazel-contrib/rules_python/pull/4125)).
71+
* (rules) Fixed loading Python extension modules from paths longer than `MAX_PATH` on Windows.
72+
* (runfiles) Updated {obj}`runfiles.Path` method signatures for Python 3.14
73+
typeshed compatibility and fixed {obj}`runfiles.Path.match` on Python 3.12+.
74+
([#4023](https://github.com/bazel-contrib/rules_python/issues/4023))
75+
* (stamping) The build data spawn action is now skipped when `--stamp=false` and,
76+
instead the metadata file is written at analysis time via `ctx.actions.write()`.
77+
* (toolchain) Fixed a crash in {obj}`py_test` main validation
78+
({obj}`validate_test_main`) on Windows: the interpreter used for the check
79+
couldn't find its DLLs or its stdlib once relocated
80+
([#4079](https://github.com/bazel-contrib/rules_python/issues/4079)).
81+
* (toolchain) Fixed a crash on Windows when precompiling is enabled:
82+
the precompiler's interpreter couldn't find its DLLs once relocated
83+
([#4082](https://github.com/bazel-contrib/rules_python/issues/4082)).
84+
85+
{#v2-4-0-added}
86+
### Added
87+
* (runfiles) Added {obj}`Runfiles.CreateOrRaise` to return a `Runfiles` instance
88+
or raise an error if runfiles cannot be found.
89+
* (uv) Added {obj}`directory` attribute to {obj}`lock` to support running `uv`
90+
commands within subdirectories when generating lock files. Defaults to the
91+
package directory, set it to `None` or `""` to set it to the root of the repo
92+
([#4029](https://github.com/bazel-contrib/rules_python/issues/4029)).
93+
94+
3295
{#v2-3-3}
3396
## [2.3.3] - 2026-09-04
3497

‎gazelle/docs/installation_and_usage.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ gazelle_python_manifest(
123123
)
124124
```
125125

126-
:::{versionchanged} VERSION_NEXT_FEATURE
126+
:::{versionchanged} 2.4.0
127127
The `requirements` argument is deprecated in favor of `lockfiles`, which can
128128
refer to any dependency lockfile, including `uv.lock`.
129129
:::

‎gazelle/manifest/defs.bzl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def gazelle_python_manifest(
3131
**kwargs):
3232
"""A macro for defining the updating and testing targets for the Gazelle manifest file.
3333
34-
:::{versionchanged} VERSION_NEXT_FEATURE
34+
:::{versionchanged} 2.4.0
3535
The `requirements` argument is deprecated in favor of `lockfiles`, which
3636
can refer to any dependency lockfile, including `uv.lock`.
3737
:::

‎news/2570.fixed.md‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎news/4023.changed.md‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎news/4025.fixed.md‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎news/4029.added.md‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎news/4071.fixed.md‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎news/4079.fixed.md‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎news/4082.fixed.md‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)