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 anish.tambe
Recipients anish.tambe, docs@python
Date 2016-11-04.19:17:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1478287078.75.0.465203808408.issue28616@psf.upfronthosting.co.za>
In-reply-to
Content
help(sys.version_info) suggests releaselevel is one among - 

 |  releaselevel
 |      'alpha', 'beta', 'candidate', or 'release'

Notice that the last one is 'release'.

But the implementation says current value is - 'final'.

$ python
Python 2.7.12 (default, Oct 11 2016, 05:24:00) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version_info
sys.version_info(major=2, minor=7, micro=12, releaselevel='final', serial=0)
>>> 


$ python3
Python 3.5.2 (default, Oct 11 2016, 05:05:28) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.version_info
sys.version_info(major=3, minor=5, micro=2, releaselevel='final', serial=0)
>>> 


The documentation (https://docs.python.org/3/library/sys.html#sys.version_info or Doc/library/sys.rst) agrees with the implementation.

The tests also agree with the implementation. 
grep for releaselevel and see - 
Lib/test/test_sys.py:504:        self.assertIn(vi.releaselevel, ("alpha", "beta", "candidate", "final"))

Hence, submitting a patch to change the help documentaion to reflect the correct value for releaselevel.

[Motivation - I tried to print a warning to the user in case my app was not being run on a final release, and I tried to do that by equating releaselevel with 'release' as the help suggested.]
History
Date User Action Args
2016-11-04 19:17:58anish.tambesetrecipients: + anish.tambe, docs@python
2016-11-04 19:17:58anish.tambesetmessageid: <1478287078.75.0.465203808408.issue28616@psf.upfronthosting.co.za>
2016-11-04 19:17:58anish.tambelinkissue28616 messages
2016-11-04 19:17:58anish.tambecreate