#20287 Python for Pants upgrade and syntax plan
New discussion created by
cburroughs
Thanks to all of the scie-pants and release machinery work (huzzah!) we should at least be clear to upgrade the version of Python used by Pants itself. That's currently 3.9, how do we get to 3.12?
Slow and Steady
Upgrade release by release, leaving lots of time for things for things to shake out. Easy-ish to revert any single step. Spreads benefits and pain out over time. Smaller(?) steps for plugin authors to jump across.
• 2.20: enable pyupgrade backend for pants itself and configure for 3.9 (does not change code); upgrade pants to use python 3.10
• 2.21: configure pyupgrade for 3.10
• 2.23: upgrade pants to use Python 3.11
• 2.24: configure pyupgrade for 3.11
• 2.25: upgrade pants to use Python 3.12
• 2.26: configure pyupgade or 3.12
Just Do It
• 2.20: upgrade pants to use Python 3.12; set pyupgrade to 3.12; Done.
Gets the project there sooner but if issues are not sussed out right away the revert might be a mess? Possibly too much drift for cherry-picking across branches. More risk but done sooner.
My personal inclination leans towards "Slow and Steady", eventually upgrading Python should be pretty boring and we can make it boring by practicing a bunch of boring steps.
pantsbuild/pants