We're pleased to announce Pants 2.17.0, the latest release of Pants Build, the scalable and ergonomic build system. To update, set
pants_version = "2.17.0" in your
pants.toml. See upgrade tips for more information.
Version 2.17.0 comes quickly after 2.16.0, which was one of our biggest releases ever, but still contains many notable changes, along side bug fixes, documentation, and performance improvements:
- You can now support Pants financially. Pants is an open-source project that is not owned or controlled by any one company or organization, and does incur some expenses. These expenses are managed by Pants Build, a non-profit that was established for this purpose. This non-profit's only source of revenue is sponsorship by individuals and companies that use Pants. We offer formal sponsorship tiers for companies, as well as individual sponsorships via GitHub.
pantslauncher binary is now the recommended way to run Pants and use of a
./pantsshell script in a repository is deprecated. See the Pants installation instructions for additional information on how to migrate to this way or running Pants.
- The default version of Pip that is used for resolving requirements and generating lockfiles has been bumped to
v23.1.2which performs faster in backtracking scenarios when there are package version conflicts.
- Support for Taplo, a TOML toolkit written in Rust, has been added and can now be used to format TOML files. To use, add
"pants.backend.tools.taplo"to the list of
pants.toml. See an example usage below:
$ pants fmt pants*.toml
10:24:29.91 [WARN] Completed: Format with taplo - taplo made changes.
+ taplo made changes.
- Pants 2.17 ships with a new Rust-based, multithreaded, in-process dependency parser for Python. This greatly speeds up dependency parsing compared to the previous implementation. To try the new parser, set
pants.toml. You may want to run
pants peek :: > before.jsonand then
pants --python-infer-use-rust-parser peek :: > after.jsonand compare the two results before switching to the new parser.
- The serverless
python_google_cloud_functiontargets now support a new
'zip'layout, as recommended by the cloud vendors. This layout gives smaller packages and faster cold starts than the existing Lambdex layout, and will become the default in 2.18. See the docs for
- You can now use the
pantsbinary launcher from anywhere in your repository, not just the project root. This also means that Pants will respect the address specs passed on the command line relative to the current working directory rather than the build root. See this in action in our example-python repository:
# target addresses are resolved relative to the build root
$ pants --pants-version=2.16.0 list :
# target addresses are resolved relative to the current working directory
$ pants --pants-version=2.17.0 list :
Node.jssubpath imports as well as the
Try out one of our example repositories:
And let us know what you think in Slack!
Pants wouldn't be possible without everyone who contributed to 2.17.0, including everyone who shared feedback on changes and who tested release candidates! Thank you very much!