pantsbuild / pants

The Pants Build System
https://www.pantsbuild.org
Apache License 2.0
3.34k stars 638 forks source link

use explicit setup-python versions over implicit expose- (Cherry-pick of #21568, #21582) #21667

Closed huonw closed 2 days ago

huonw commented 3 days ago

The project is currently using a mix of the GitHub supplied setup-python action and pantsbuild/actions/expose-pythons. On GitHub managed runners they behave similarly:

So today the invocation of setup-python followed by expose-pythons is redundant.

Consolidating on setup-python let's us be explicit about expected versions (more like the ARM image) and reduces the number of custom actions the project manages while still making multiple Python versions available.

NOTE: The awkward double newlines in the final yaml are a pre-existing issue https://stackoverflow.com/questions/45004464/yaml-dump-adding-unwanted-newlines-in-multiline-strings

See #21552 for some history regarding the setup- vs expose- actions.

cburroughs commented 2 days ago

I think the compatible with recent Python pip version is only in Pants 2.24, correct?