[issue9442] Update sys.version doc
New submission from Éric Araujo <merwok@netwok.org>: 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. ---------- assignee: docs@python components: Documentation files: sys.version1.diff keywords: patch messages: 112189 nosy: docs@python, merwok priority: normal severity: normal stage: patch review status: open title: Update sys.version doc versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file18289/sys.version1.diff _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue9442> _______________________________________
Martin v. Löwis <martin@v.loewis.de> added the comment: 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. ---------- nosy: +loewis _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue9442> _______________________________________
Georg Brandl <georg@python.org> added the comment: 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. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue9442> _______________________________________
Éric Araujo <merwok@netwok.org> added the comment: 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? ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue9442> _______________________________________
Martin v. Löwis <martin@v.loewis.de> added the comment: 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? ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue9442> _______________________________________
Georg Brandl <georg@python.org> added the comment: I think it meant that '3.2' is the string used for determining the /usr/lib/python3.2 directory name. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue9442> _______________________________________
Roundup Robot <devnull@psf.upfronthosting.co.za> added the comment: 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 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue9442> _______________________________________
Roundup Robot <devnull@psf.upfronthosting.co.za> added the comment: 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 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue9442> _______________________________________
Roundup Robot <devnull@psf.upfronthosting.co.za> added the comment: New changeset 0cc1fbbb473d by Éric Araujo in branch 'default': Use sys.version_info instead of sys.version. http://hg.python.org/distutils2/rev/0cc1fbbb473d ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue9442> _______________________________________
Roundup Robot <devnull@psf.upfronthosting.co.za> added the comment: 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 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue9442> _______________________________________
participants (4)
-
Georg Brandl
-
Martin v. Löwis
-
Roundup Robot
-
Éric Araujo