Closed hugovk closed 2 years ago
Looks great, thanks for looking into this. The NEP29 guidelines you share above actually suggest python 3.8 for all releases after December 26th, 2021 (42 months expired since python 3.7 realease). That's excellent because it's already the python version the tests are working on (that was my local version at the time of development), and still is the version shipped with Ubuntu 20.04 LTS, which is not quite dead yet (upgrade is suggested after the first point release of 22.04 LTS, probably after summer). Python 3.8 already introduces f strings, IMO a very handy feature.
f-strings were introduced already in Python 3.6.
Some useful tools:
https://github.com/asottile/pyupgrade/ can do many f-string rewrites amongst its other upgrades, but is "intentionally timid":
python -m pip install -U pyupgrade
pyupgrade **/*.py --py36-plus
(See also --py37-plus
and --py38-plus
.)
And https://github.com/ikamensh/flynt is especially for f-strings and can do more.
Sounds good, thanks for the hints.
Fixes https://github.com/perrette/papers/issues/17.
What is the minimum Python 3 version supported? We could modernise further to match.
Python 3.7 is the oldest still supported by the core CPython team:
And Scientific Python projects often follow NEP 29, with 3.7 as a minimum: