Skip to content

Conversation

@cognifloyd
Copy link
Member

@cognifloyd cognifloyd commented Mar 6, 2025

This PR bumps pants from 2.23.0a0 to 2.25.0. This release brings several improvements/fixes:

  • pants 2.25+ now (internally) uses python 3.11 instead of python 3.9.
    • So, code under pants-plugins/ now targets python 3.11.
    • I also had to update the pantsbuild/actions/init-pants GHA action to v10.
  • the nfpm backend in pants 2.25 includes a new plugin hook so that we can DRY the rpm/deb definition in BUILD metadata and inject the version number more easily. A follow-up PR will adjust our pants-plugins/release plugin to make use of this.
  • pants options (pants.toml) changes:
    • pants moved the pants.toml options parsing from python to rust, so it should be a bit faster.
    • a new pants feature to specify env var name globs. Our ST2TESTS_* vars are mentioned in the release notes as one of the target use-cases.
  • pants bumped the default version of twine. Since we're not relying on twine yet, I copied that bump.

Other changes in this PR:

  • GHA: try to speed things up a bit by using the python versions already cached in the GHA runner image.

lockfiles/pants-plugins.lock

Note that pants 2.25 uses python 3.11 instead of python 3.9. This only affects the pants-plugins resolve (ie code under the pants-plugins/ directory). Our code continues to have our own interpreter constraints (in the st2 resolve).

Lockfile diff: lockfiles/pants-plugins.lock [pants-plugins]

==                    Upgraded dependencies                     ==

  attrs                          24.2.0       -->   25.3.0
  pantsbuild-pants               2.23.0a0     -->   2.25.0
  pantsbuild-pants-testutil      2.23.0a0     -->   2.25.0
  pyparsing                      3.1.4        -->   3.2.1
  six                            1.16.0       -->   1.17.0
  tomli                          2.0.1        -->   2.2.1

==                     Removed dependencies                     ==

  pex                            2.16.2

lockfiles/twine.lock

This was only bumped to capture an issue that was fixed in pants 2.25 by constraining the version of importlib-metadata. We don't use twine officially yet, so just copy the requirements from pants.

Lockfile diff: lockfiles/twine.lock [twine]

==                    Upgraded dependencies                     ==

  jeepney                        0.8.0        -->   0.9.0
  nh3                            0.2.20       -->   0.2.21
  pkginfo                        1.12.0       -->   1.12.1.2
  twine                          3.7.1        -->   4.0.2

==                !! Downgraded dependencies !!                 ==

  importlib-metadata             8.5.0        -->   7.2.1

==                      Added dependencies                      ==

  markdown-it-py                 3.0.0
  mdurl                          0.1.2
  rich                           13.9.4
  typing-extensions              4.12.2

==                     Removed dependencies                     ==

  tqdm                           4.67.1

@cognifloyd cognifloyd added this to the pants milestone Mar 6, 2025
@cognifloyd cognifloyd self-assigned this Mar 6, 2025
@pull-request-size pull-request-size bot added the size/XL PR that changes 500-999 lines. Consider splitting work into several ones that easier to review. label Mar 6, 2025
Lockfile diff: lockfiles/pants-plugins.lock [pants-plugins]

==                    Upgraded dependencies                     ==

  attrs                          24.2.0       -->   25.1.0
  pantsbuild-pants               2.23.0a0     -->   2.24.2
  pantsbuild-pants-testutil      2.23.0a0     -->   2.24.2
  pyparsing                      3.1.4        -->   3.2.1
  six                            1.16.0       -->   1.17.0
  tomli                          2.0.1        -->   2.2.1

==                     Removed dependencies                     ==

  pex                            2.16.2
Lockfile diff: lockfiles/pants-plugins.lock [pants-plugins]

==                    Upgraded dependencies                     ==

  attrs                          25.1.0       -->   25.3.0
  pantsbuild-pants               2.24.2       -->   2.25.0
  pantsbuild-pants-testutil      2.24.2       -->   2.25.0
This is based on changes in pants:
- pantsbuild/pants#18431
- pantsbuild/pants#21894

Lockfile diff: lockfiles/twine.lock [twine]

==                    Upgraded dependencies                     ==

  jeepney                        0.8.0        -->   0.9.0
  nh3                            0.2.20       -->   0.2.21
  pkginfo                        1.12.0       -->   1.12.1.2
  twine                          3.7.1        -->   4.0.2

==                !! Downgraded dependencies !!                 ==

  importlib-metadata             8.5.0        -->   7.2.1

==                      Added dependencies                      ==

  markdown-it-py                 3.0.0
  mdurl                          0.1.2
  rich                           13.9.4
  typing-extensions              4.12.2

==                     Removed dependencies                     ==

  tqdm                           4.67.1
@cognifloyd cognifloyd changed the title Pants: Upgrade from 2.23.0a0 to 2.25.0rc0 Pants: Upgrade from 2.23.0a0 to 2.25.0 Mar 19, 2025
@cognifloyd cognifloyd marked this pull request as ready for review March 19, 2025 17:31
@cognifloyd cognifloyd requested review from a team, guzzijones, nzlosh and rush-skills March 19, 2025 17:31
@cognifloyd cognifloyd requested a review from a team March 19, 2025 21:43
@cognifloyd cognifloyd enabled auto-merge March 19, 2025 22:09
@cognifloyd cognifloyd merged commit b44c5c3 into master Mar 19, 2025
79 of 83 checks passed
@cognifloyd cognifloyd deleted the pants-upgrade branch March 19, 2025 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external dependency maintenance pantsbuild python3 size/XL PR that changes 500-999 lines. Consider splitting work into several ones that easier to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants