[issue28616] sys.version_info.releaselevel - 'final' or 'release'

2016-11-04 Thread Ned Deily

Ned Deily added the comment:

Thanks for the patch!

--
nosy: +ned.deily
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions:  -Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28616] sys.version_info.releaselevel - 'final' or 'release'

2016-11-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0b4bcd954554 by Ned Deily in branch '2.7':
Issue #28616: Correct help for sys.version_info releaselevel component.
https://hg.python.org/cpython/rev/0b4bcd954554

New changeset 1390bde4b768 by Ned Deily in branch '3.5':
Issue #28616: Correct help for sys.version_info releaselevel component.
https://hg.python.org/cpython/rev/1390bde4b768

New changeset 048870daf397 by Ned Deily in branch '3.6':
Issue #28616: merge from 3.5
https://hg.python.org/cpython/rev/048870daf397

New changeset 87d76ce01217 by Ned Deily in branch 'default':
Issue #28616: merge from 3.6
https://hg.python.org/cpython/rev/87d76ce01217

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28616] sys.version_info.releaselevel - 'final' or 'release'

2016-11-04 Thread Anish Tambe

New submission from Anish Tambe:

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.]

--
assignee: docs@python
components: Documentation
files: releaselevel.patch
keywords: patch
messages: 280071
nosy: anish.tambe, docs@python
priority: normal
severity: normal
status: open
title: sys.version_info.releaselevel - 'final' or 'release'
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45356/releaselevel.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com