bpo-24916: Change _PY_VERSION in sysconfig.py and py_version in install.py by lysnikolaou · Pull Request #10321 · python/cpython (original) (raw)

This doesn't seem to address my concern in the bpo discussion, namely, the pre-release indicator is no longer in py_version. For example, at the moment, if you build the 3.7 branch from its current HEAD, the output of python -M sysconfig includes:

py_version = "3.7.1+"
But with the PR as it stands, the output is now:

py_version = "3.7.1"

And to make life interesting, the platform module still returns these values:

>>> platform.python_version()
'3.7.1+'
>>> platform.python_version_tuple()
('3', '7', '1+')

Sigh! There are reasons why this issue is still open; it's not really obvious what the right answers are here. Because it's hard to know where py_version might be being used in the wild, we should be cautious about changing its behavior. I think we should probably discuss this back on the b-p-o issue. Perhaps you could summarize things there?