classification
Title: Use sys.version_info instead of sys.version
Type: behavior Stage: resolved
Components: Distutils, Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: SilentGhost, aplummer, dstufft, eric.araujo, lemburg, martin.panter, python-dev, serhiy.storchaka, tarek, vstinner
Priority: normal Keywords: patch

Created on 2016-01-01 07:45 by serhiy.storchaka, last changed 2016-02-11 11:34 by serhiy.storchaka. This issue is now closed.

Files
File name Uploaded Description Edit
use_version_info.patch serhiy.storchaka, 2016-01-01 07:44 review
use_version_info_2.patch serhiy.storchaka, 2016-02-09 16:32 review
use_version_info_3.patch serhiy.storchaka, 2016-02-10 08:43 review
Messages (10)
msg257279 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-01-01 07:44
Proposed patch replaces all occurrences of sys.version[:3] with '%d.%d' % sys.version_info[:2]. The former doesn't work with non-one-digit versions (such as 3.10 and 10.1).
msg259875 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-02-08 19:08
Could anyone please make a review? We should solve this issue before releasing 3.10.
msg259879 - (view) Author: Andrew Plummer (aplummer) * Date: 2016-02-08 20:03
On a related note, I think that https://hg.python.org/cpython/file/tip/Makefile.pre.in#l571 should get the same treatment.
msg259882 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-02-08 20:18
> On a related note, I think that https://hg.python.org/cpython/file/tip/Makefile.pre.in#l571 should get the same treatment.

Agree, that should be included in the patch.
msg259910 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-02-09 02:49
See also Issue 24916 about more related fixes in Lib/sysconfig.py
msg259943 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-02-09 16:32
Update patch uses less cryptic formatting expressions (thanks SilentGhost for suggestion), fixes Makefile.pre.in (thanks Andrew), and fixes yet few files.
msg259993 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-02-10 08:43
Updated patch addresses SilentGhosts comments.
msg259995 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-02-10 08:52
No further comments from me.
msg260043 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-02-10 22:07
Review: LGTM, with a minor comment.
msg260085 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-02-11 11:11
New changeset 935d7804d1be by Serhiy Storchaka in branch 'default':
Issue #25985: sys.version_info is now used instead of sys.version
https://hg.python.org/cpython/rev/935d7804d1be
History
Date User Action Args
2016-02-11 11:34:09serhiy.storchakasetstatus: open -> closed
assignee: serhiy.storchaka
resolution: fixed
stage: patch review -> resolved
2016-02-11 11:11:03python-devsetnosy: + python-dev
messages: + msg260085
2016-02-10 22:07:00vstinnersetnosy: + vstinner
messages: + msg260043
2016-02-10 08:52:07SilentGhostsetmessages: + msg259995
2016-02-10 08:43:12serhiy.storchakasetfiles: + use_version_info_3.patch

messages: + msg259993
2016-02-09 16:32:53serhiy.storchakasetfiles: + use_version_info_2.patch

messages: + msg259943
2016-02-09 02:49:40martin.panterlinkissue24916 dependencies
2016-02-09 02:49:29martin.pantersetnosy: + martin.panter
messages: + msg259910
2016-02-08 20:18:10SilentGhostsetnosy: + SilentGhost
messages: + msg259882
2016-02-08 20:03:16aplummersetnosy: + aplummer
messages: + msg259879
2016-02-08 19:08:06serhiy.storchakasetmessages: + msg259875
2016-01-01 07:45:03serhiy.storchakacreate