This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients benjamin.peterson, georg.brandl, martin.panter, ned.deily, serhiy.storchaka, takluyver, vstinner
Date 2016-02-11.04:42:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455165777.39.0.126758452004.issue24916@psf.upfronthosting.co.za>
In-reply-to
Content
My understanding is that the "+" is added to the PY_VERSION in Include/patchlevel.h by the release management process after any tagged release, whether pre-release or final.  So '+" is supposed to be set whenever CPython is built from anything other than an official tagged revision.  AFAICT, "py_version" and friends were added to sysconfig when sysconfig was initially moved out of distutils (in fa69e891edf4) to become its own standalone module as part of the last big set of distutils enhancements which were later largely reverted, ending up with two versions of sysconfig: the newer standalone sysconfig.py and with the older distutils/sysconfig.py.  It appears "py_version" and friends have never been implemented in the distutils/sysconfig.py so it's likely that they aren't used much in the wild but it would be nice to not break the current compatibility.  Perhaps expanding sys.version_info to contain the "modified" (?) ("+") field would be a good idea or possibly adding a new value to "releaselevel".  As it currently stands:

$ /usr/local/bin/python3.5
Python 3.5.1 (v3.5.1:37a07cee5969, Dec  5 2015, 21:12:44)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version
'3.5.1 (v3.5.1:37a07cee5969, Dec  5 2015, 21:12:44) \n[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]'
>>> sys.version_info
sys.version_info(major=3, minor=5, micro=1, releaselevel='final', serial=0)

$ ./python
Python 3.5.1+ (default, Feb 11 2016, 14:00:02)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version_info
sys.version_info(major=3, minor=5, micro=1, releaselevel='final', serial=0)
>>> sys.version
'3.5.1+ (default, Feb 11 2016, 14:00:02) \n[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]'

It seems wrong that one cannot use sys.version_info to distinguish between a release build and a post-release development build.  

I'm nosying Georg and Benjamin for institutional memory picking.
History
Date User Action Args
2016-02-11 04:42:57ned.deilysetrecipients: + ned.deily, georg.brandl, vstinner, benjamin.peterson, takluyver, martin.panter, serhiy.storchaka
2016-02-11 04:42:57ned.deilysetmessageid: <1455165777.39.0.126758452004.issue24916@psf.upfronthosting.co.za>
2016-02-11 04:42:57ned.deilylinkissue24916 messages
2016-02-11 04:42:56ned.deilycreate