Skip to content

Commit

Permalink
miscellaneous 2.24 release notes copy edits (Cherry-pick of #21721) (#…
Browse files Browse the repository at this point in the history
…21727)

Co-authored-by: cburroughs <[email protected]>
  • Loading branch information
WorkerPants and cburroughs authored Dec 6, 2024
1 parent 3d752a2 commit 8c0271d
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions docs/notes/2.24.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ We offer [formal sponsorship tiers for companies](https://www.pantsbuild.org/spo

- Support for Python 3.13
- `pants export --bin` allows exporting more tools for use outside Pants
- A new experimental Python Provider backend using [Python Build Standalone](https://gregoryszorc.com/docs/python-build-standalone/main/).
- A new options system unlocks future changes.


### Deprecations

- **Python 2.7**: As announced in the v2.23.x release series, Pants v2.24 and later are not proactively tested in CI with Python 2.7 since [Python 2.7 is no longer supported by its maintainers as of 1 January 2020](https://www.python.org/doc/sunset-python-2/). While Pants may continue to work with Python 2.7 in the near term, Pants no longer officially supports use of Python 2.7, and, consequently, any remaining support for Python 2.7 may "bit rot" and diverge over time. Contributions to fix issues with Python 2.7 support will continue to be accepted, but will depend on any community contributions and will not constitute continued official support for Python 2.7.
Expand Down Expand Up @@ -56,19 +58,19 @@ Fix a bug where Pants sent a minor Go version instead of the major one to the Go

Recognize `-fullpath` as a test binary flag.

Add support for the `all:` prefix to patterns used with the `go:embed` directive. The `all:` prefix includes files which start with `_` or `.` which are ordinarilly excluded .
Add support for the `all:` prefix to patterns used with the `go:embed` directive. The `all:` prefix includes files which start with `_` or `.` which are ordinarily excluded .

#### JVM

Compression of class files into a jar file is not reading or writing from the remote cache. The size of jar files, combined with the low computational cost of compression, can outweigh the advantages of using a remote cache.

Fixed a coursier fetch wrapper script bug on nixos.
Fixed a Coursier fetch wrapper script bug on NixOS.

Fixed a jvm.sh script bug on nixos.
Fixed a jvm.sh script bug on NixOS.

#### Kotlin

The kotlin linter, [ktlint](https://pinterest.github.io/ktlint/), has been updated to version 1.3.1.
The Kotlin linter, [ktlint](https://pinterest.github.io/ktlint/), has been updated to version 1.3.1.

#### Python

Expand All @@ -80,15 +82,15 @@ Pants' support for different Python versions has changed:

- Pants v2.24 and later are not proactively tested in CI with Python 2.7 since [Python 2.7 is no longer supported by its maintainers as of 1 January 2020](https://www.python.org/doc/sunset-python-2/). While Pants may continue to work with Python 2.7 in the near term, Pants no longer officially supports use of Python 2.7, and, consequently, any remaining support for Python 2.7 may "bit rot" and diverge over time. Contributions to fix issues with Python 2.7 support will continue to be accepted, but will depend on any community contributions and will not constitute continued official support for Python 2.7.

**Breaking change**: the `pants.backend.experimental.python.lint.ruff.check` and `pants.backend.experimental.python.lint.ruff.format` subsystems now execute Ruff as a downloaded binary, directly from the Ruff releases, rather than using PEX to execute the PyPI `ruff` package. This has less overhead, and makes customising the version simpler. However, **options like [`[ruff].install_from_resolve`](https://www.pantsbuild.org/2.24/reference/subsystems/ruff#install_from_resolve) are now ignored** and will be removed in future. If you have customised the version, use [`[ruff].version`](https://www.pantsbuild.org/2.24/reference/subsystems/ruff#version) and [`[ruff].known_versions`](https://www.pantsbuild.org/2.24/reference/subsystems/ruff#known_versions) instead. This version of Pants includes built-in known-versions for the latest patch release (at time of development) of each `0.x` minor series (0.7.2, 0.6.9, 0.5.7, 0.4.10, 0.3.7, 0.2.2, 0.1.15): if you install from a resolve with a particular pinned version of Ruff, you may find setting `[ruff].version` to the closest matching version in that list is acceptable (if not, you may need to add to `[ruff].known_versions`).
**Breaking change**: the `pants.backend.experimental.python.lint.ruff.check` and `pants.backend.experimental.python.lint.ruff.format` subsystems now execute Ruff as a downloaded binary, directly from the Ruff releases, rather than using Pex to execute the PyPI `ruff` package. This has less overhead, and makes customizing the version simpler. However, **options like [`[ruff].install_from_resolve`](https://www.pantsbuild.org/2.24/reference/subsystems/ruff#install_from_resolve) are now ignored** and will be removed in future. If you have customized the version, use [`[ruff].version`](https://www.pantsbuild.org/2.24/reference/subsystems/ruff#version) and [`[ruff].known_versions`](https://www.pantsbuild.org/2.24/reference/subsystems/ruff#known_versions) instead. This version of Pants includes built-in known-versions for the latest patch release (at time of development) of each `0.x` minor series (0.7.2, 0.6.9, 0.5.7, 0.4.10, 0.3.7, 0.2.2, 0.1.15): if you install from a resolve with a particular pinned version of Ruff, you may find setting `[ruff].version` to the closest matching version in that list is acceptable (if not, you may need to add to `[ruff].known_versions`).

Version Updates:

- As a consequence of the lockfile generation, newer versions of many tools are now included in the default lockfiles.

- The default version of pip is now [24.2](https://pip.pypa.io/en/stable/news/#v24-2) bringing performance improvements to dependency resolution and support or the upcoming Python 3.13 release.
- The default version of pip is now [24.2](https://pip.pypa.io/en/stable/news/#v24-2) bringing performance improvements to dependency resolution and support for Python 3.13.

- The versions of `setuptools` and `wheel` used in Pants have been upgraded to `74.1.2` and `0.44.0` to address a remote code execution vulnerability in versions before setuptools `70.0`. This forces the minimum Python version to 3.8, in line with the changes mentioned above.
- The default versions of `setuptools` and `wheel` used in Pants have been upgraded to `74.1.2` and `0.44.0` to address a remote code execution vulnerability in versions before setuptools `70.0`. This forces the minimum Python version to 3.8, in line with the changes mentioned above.

- The default version of the [Pex](https://docs.pex-tool.org/) tool has been updated from 2.16.2 to [2.20.3](https://github.com/pex-tool/pex/releases/tag/v2.20.3).

Expand Down Expand Up @@ -124,13 +126,13 @@ Added a new `cache_scope` field to [`adhoc_tool`](https://www.pantsbuild.org/2.2

### Plugin API changes

The `path_metadata_request` intrinsic rule can now access metadata for paths in the local system outside of the build root. Use the new `namespace` field on `PathMetadataRequest` to request metdata on local system paths using namespace `PathNamespace.SYSTEM`.
The `path_metadata_request` intrinsic rule can now access metadata for paths in the local system outside of the build root. Use the new `namespace` field on `PathMetadataRequest` to request metadata on local system paths using namespace `PathNamespace.SYSTEM`.

PyO3, the interface crate between Rust and Python, has been upgraded to v0.22.x. A major change is that all Python values on the Rust side must be handled via either the `pyo3::Bound` or `pyo3::Py` smart pointers; direct references such as `&PyAny` are no longer supported.

`GenerateToolLockfileSentinel` is removed. See the [porting guide details](https://www.pantsbuild.org/2.24/docs/writing-plugins/common-plugin-tasks/plugin-upgrade-guide#deprecated-generatetoollockfilesentinel) for instructions on migrating.

Previously `SetupKwargs` took `_allow_banned_keys` which would allow one to pass in certain critical setuptools args (ex: `install_requires`) that Pants calculates for you. If you Really Really know what you are doing you can know also use `_overwrite_banned_keys` to exclusively use your own values and ignore the Pants calculated ones.
Previously `SetupKwargs` took `_allow_banned_keys` which would allow one to pass in certain critical setuptools args (ex: `install_requires`) that Pants calculates for you. If you Really Really know what you are doing you can know also use `_overwrite_banned_keys` to exclusively use your own values and ignore the Pants calculated ones.

## Full Changelog

Expand Down

0 comments on commit 8c0271d

Please sign in to comment.