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: Show sys.version when -V option is supplied twice.
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: methane Nosy List: martin.panter, matrixise, methane, ned.deily, python-dev, vstinner
Priority: high Keywords: easy, patch

Created on 2016-10-25 17:51 by methane, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
verbose-version.patch methane, 2016-10-25 17:51 review
verbose-version2.patch methane, 2016-10-30 08:24 review
verbose-version3.patch methane, 2016-10-30 10:31 review
vervose-version-doc.patch methane, 2016-11-21 12:18 review
vervose-version-doc2.patch methane, 2016-11-23 11:24 review
Pull Requests
URL Status Linked Edit
PR 552 closed dstufft, 2017-03-31 16:36
Messages (16)
msg279428 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-25 17:51
As discussed on python-dev, this patch adds -VV option to python cmdline.

$ ./python -V
Python 3.6.0b2+
$ ./python -VV
Python 3.6.0b2+ (3.6:84a3c5003510+, Oct 26 2016, 02:47:38) 
[GCC 6.2.0 20161005]

The patch includes doc and man update.
Please see, especially my English.
msg279705 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2016-10-30 05:25
" -V     : print the Python version number and exit (also --version)\n\
+         when given twice, print more information about build\n\
+         can be supplied multiple times to show more information\n\"

Why do you indicate "multiple times" because there are only 2 possibilites, -V or -VV, no more.
msg279706 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-30 05:29
Since I'm not good English writer, I copied & modified from -v option.
-VVV is same to -VV, similar to -vvv is same to -vv.

-v     : verbose (trace import statements); also PYTHONVERBOSE=x
         can be supplied multiple times to increase verbosity
msg279707 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2016-10-30 05:41
yep, but in this case, just add -VV will add more details about the current revision.

About -VVV or -VV, yes, it's similar because the same C code version >= 2, Py_GetVersion()
msg279710 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-10-30 06:04
I left some review comments. Also (as a native English speaker), I think it is okay to drop the third line about “multiple times”. You already say it may be given twice in the line above.
msg279714 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-10-30 08:53
Sorry, I should have said: the other two files (Misc/python.man and Modules/main.c) also need an extra “the”, like you changed in Doc/using/cmdline.rst.

Other than that, it looks okay to me. But I guess you could add a quick test case in Lib/test/test_cmd_line.py. There’s already one for single -V and --version.
msg279720 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-30 10:31
Oh, it seems I hurried too much.
Thanks to pointing it out.
msg281345 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-11-21 10:20
I noticed today is code freeze for final beta.
Is this too late for 3.6.0?
msg281348 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-11-21 11:39
Ned indicated he was open to the idea: <http://mid.mail-archive.com/nu39u2$9ri$1@blaine.gmane.org>. Maybe just double check; there’s still a few hours left!

I’m not sure, but maybe there should be “.. versionchanged:: 3.6” in the RST documentation, and an entry in What’s New?
msg281349 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-11-21 11:42
verbose-version3.patch LGTM and seems useful to me.
msg281351 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-11-21 11:58
New changeset fc6bb69cec05 by INADA Naoki in branch '3.6':
Issue #28532: Show sys.version when -V option is supplied twice
https://hg.python.org/cpython/rev/fc6bb69cec05

New changeset 02aa667bd02d by INADA Naoki in branch 'default':
Issue #28532: Show sys.version when -V option is supplied twice
https://hg.python.org/cpython/rev/02aa667bd02d
msg281352 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-11-21 12:18
Thanks for review.
Since doc update is allowed after final beta, I committed verbose-version3.patch for now.

Here is patch for doc.
msg281392 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-11-21 21:55
The text looks okay. I’m not sure about putting it in the “Porting to Python 3.6” section, but there doesn’t seem to be a more appropriate existing heading. Perhaps we need a new heading, say “Other Improvement”, near “Optimizations” and “Build and C API Changes”. A previous What’s New had <https://docs.python.org/3.4/whatsnew/3.4.html#other-improvements>.
msg281555 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-11-23 11:24
Elvis agreed to add "Other Improvements" section. (http://bugs.python.org/issue28635#msg281486)

Here is new patch.
msg281586 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-11-23 21:14
Looks good to me
msg281617 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-11-24 08:21
New changeset 5a29ab5a4785 by INADA Naoki in branch '3.6':
Issue #28532: Add what's new entry for python -VV option
https://hg.python.org/cpython/rev/5a29ab5a4785

New changeset 3f9f13077ca8 by INADA Naoki in branch 'default':
Issue #28532: Add what's new entry for python -VV option
https://hg.python.org/cpython/rev/3f9f13077ca8
History
Date User Action Args
2022-04-11 14:58:38adminsetgithub: 72718
2017-03-31 16:36:12dstufftsetpull_requests: + pull_request876
2016-11-24 08:22:19methanesetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2016-11-24 08:21:57python-devsetmessages: + msg281617
2016-11-23 21:14:52martin.pantersetmessages: + msg281586
2016-11-23 11:24:05methanesetfiles: + vervose-version-doc2.patch

messages: + msg281555
2016-11-21 21:55:31martin.pantersetmessages: + msg281392
2016-11-21 12:18:41methanesetfiles: + vervose-version-doc.patch

messages: + msg281352
2016-11-21 11:58:21python-devsetnosy: + python-dev
messages: + msg281351
2016-11-21 11:42:26vstinnersetnosy: + vstinner
messages: + msg281349
2016-11-21 11:39:21martin.pantersetnosy: + ned.deily
messages: + msg281348
2016-11-21 10:20:27methanesetpriority: normal -> high

messages: + msg281345
2016-10-30 10:31:43methanesetfiles: + verbose-version3.patch

messages: + msg279720
2016-10-30 08:53:13martin.pantersetmessages: + msg279714
2016-10-30 08:24:22methanesetfiles: + verbose-version2.patch
2016-10-30 06:04:34martin.pantersetnosy: + martin.panter
messages: + msg279710
2016-10-30 05:41:37matrixisesetmessages: + msg279707
2016-10-30 05:29:21methanesetmessages: + msg279706
2016-10-30 05:25:53matrixisesetnosy: + matrixise
messages: + msg279705
2016-10-30 05:21:34methanesetkeywords: + easy
stage: commit review
2016-10-25 17:51:01methanecreate