PYTHON_FOR_REGEN only works with Python 3.10 or newerย #104487
Description
On current main
, PYTHON_FOR_REGEN
only works with Python 3.10 or newer.
Previously, we've tried to maintain backwards compatibility with older Python versions in our build system. Last time we adjusted PYTHON_FOR_REGEN
(gh-98988), we deliberately did not bump the minimal version requirements; our configure
checks for Python 3.11 through Python 3.6.
While working on gh-104050, a discussion about version requirements came up, and we found out that on main
, make clinic
only works when PYTHON_FOR_REGEN
is Python 3.10 or newer. Also, the newly introduced "generate cases script" uses pattern matching and uses newly introduced typing features. Per now, PYTHON_FOR_REGEN
must be 3.10 or newer.
There are two solution to this:
- bump the
PYTHON_FOR_REGEN
version requirements to 3.10 inconfigure
- amend the problematic build scripts, so older Python versions are still supported
Personally, I think I'm leaning towards the former. Apparently no core dev, triager or other contributor has noticed this issue until now. No buildbot has failed (we don't test the minimum required version; perhaps we should). OTOH, I understand that it makes stuff like bootstrapping slightly more cumbersome.
Anyway, we should probably at least bump the version requirement from Python 3.6 to 3.8.