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.

classification
Title: Update sys.version doc
Type: Stage: patch review
Components: Documentation Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.araujo, georg.brandl, loewis, python-dev
Priority: normal Keywords: patch

Created on 2010-07-31 19:46 by eric.araujo, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
sys.version1.diff eric.araujo, 2010-07-31 19:46 First fix: build number
Messages (10)
msg112189 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-07-31 19:46
Attaching a patch to edit mention of “build number” in library/sys.

I also don’t understand “The first three characters are used to identify the version in the installation directories (where appropriate on each platform)”, maybe someone who does could enlighten me.

If #5778 is rejected, the doc will need another update to mention that there may be a newline in sys.version.
msg112192 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-07-31 19:58
I recommend to drop any specific guarantee of what the string looks like. Saying "svn info" is also going to be outdated soon, when the code becomes maintained in Mercurial.

Instead, the documentation should point to sys.version_info and the platform module for programmatic consumption, and explain that the string is meant for human readers.
msg112194 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-07-31 20:06
Yes, this is even better than my fix for #5778.  Changed in r83358 to:

   A string containing the version number of the Python interpreter plus additional
   information on the build number and compiler used.  This string is displayed
   when the interactive interpreter is started.  Do not extract version information
   out of it, rather, use :data:`version_info` and the functions provided by the
   :mod:`platform` module.
msg112197 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-07-31 20:30
Is “The first three characters are used to identify the version in the installation directories (where appropriate on each platform)” clear for anyone but me?
msg112199 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-07-31 20:48
Ask yourself: what are the first three characters? If that's not clear, type sys.version[:3]. Is it still unclear what this is talking about?
msg112200 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-07-31 20:49
I think it meant that '3.2' is the string used for determining the /usr/lib/python3.2 directory name.
msg144993 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-10-06 11:19
New changeset 9f6704da4abb by Éric Araujo in branch '2.7':
Fix markup used in the documentation of sys.prefix and sys.exec_prefix.
http://hg.python.org/cpython/rev/9f6704da4abb
msg144995 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-10-06 11:24
New changeset 6ea47522f466 by Éric Araujo in branch '3.2':
Fix markup used in the documentation of sys.prefix and sys.exec_prefix.
http://hg.python.org/cpython/rev/6ea47522f466
msg153017 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-02-10 04:11
New changeset 0cc1fbbb473d by Éric Araujo in branch 'default':
Use sys.version_info instead of sys.version.
http://hg.python.org/distutils2/rev/0cc1fbbb473d
msg153019 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-02-10 04:21
New changeset 6fdcfe348435 by Éric Araujo in branch 'default':
Use sys.version_info instead of sys.version in packaging.
http://hg.python.org/cpython/rev/6fdcfe348435
History
Date User Action Args
2022-04-11 14:57:04adminsetgithub: 53687
2012-02-10 04:21:00python-devsetmessages: + msg153019
2012-02-10 04:11:18python-devsetmessages: + msg153017
2011-10-06 11:24:04python-devsetmessages: + msg144995
2011-10-06 11:19:44python-devsetnosy: + python-dev
messages: + msg144993
2010-07-31 20:49:55georg.brandlsetmessages: + msg112200
2010-07-31 20:48:44loewissetmessages: + msg112199
2010-07-31 20:30:45eric.araujosetmessages: + msg112197
2010-07-31 20:06:12georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg112194

resolution: fixed
2010-07-31 19:58:31loewissetnosy: + loewis
messages: + msg112192
2010-07-31 19:46:31eric.araujocreate