New submission from Thomas Kluyver: sysconfig currently calculates various formats of the Python version number by chopping up the sys.version string. This has a FIXME by it in the code, because the the format of sys.version is not guaranteed.
With this patch, the config variables 'py_version', 'py_version_short' and 'py_version_nodot' are instead generated from sys.version_info, which has a specified structure: https://docs.python.org/3/library/sys.html#sys.version_info One piece of information is lost by this change: after a pre-release, a + is added to the version string - e.g. '3.5.0b4+' means an unreleased version somewhere after 3.5.0b4. I can't find any structured representation of this information, so 'py_version' no longer contains it. I'm not sure whether it matters: I can't find anything using the 'py_version' config variable. ---------- components: Library (Lib) files: sysconfig-version-fixme.patch keywords: patch messages: 248989 nosy: takluyver priority: normal severity: normal status: open title: In sysconfig, don't rely on sys.version format Added file: http://bugs.python.org/file40227/sysconfig-version-fixme.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24916> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com