Reminder: change the
pants_versionoption in the
[GLOBAL]scope in your pants.toml to upgrade.
You can see all releases at https://pypi.org/project/pantsbuild.pants/#history.
Per our Deprecation policy, deprecations must last a minimum of one major release. For example, something may be deprecated in 2.1.0 and then removed in 2.2.0.
This means that it is helpful to upgrade one major release at a time so that you can see all deprecation warnings.
You do not need to land every upgrade into your organization—often, you will want to upgrade your organization multiple versions at a time, e.g. 2.1.0 to 2.4.0. But, when you are working on the upgrade locally, it is helpful to iterate one version at a time.
To trigger deprecation warnings, we recommend running these commands:
$ ./pants $ ./pants list :: > /dev/null $ ./pants filedeps :: > /dev/null
It is also helpful to spot check that your main commands like
test still work by running on a single target.
Use dev releases for the newest
As described in our Release strategy, we make weekly dev releases with all the latest features and bug fixes we've been working on. While dev releases are less stable, they mean you get access to improvements sooner.
If you encounter any blocking issues, you can easily roll back to a prior version by changing the
pants_versionoption. (Please let us know the issue by opening a GitHub issue or messaging us on Slack).
Sometimes when upgrading, you will not have time to fully fix the deprecation. The
ignore_pants_warnings option allows you to silence those deprecations.
ignore_pants_warnings option expects a string with the start of the deprecation warning, like this:
[GLOBAL] ignore_pants_warnings = [ "DEPRECATED: the pantsbuild.pants.contrib", "DEPRECATED: the antlr, jaxb, ragel, and wire codegen backends", ]
Updated 8 months ago