Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show sys.version when -V option is supplied twice. #72718

Closed
methane opened this issue Oct 25, 2016 · 16 comments
Closed

Show sys.version when -V option is supplied twice. #72718

methane opened this issue Oct 25, 2016 · 16 comments
Assignees
Labels
3.7 (EOL) end of life easy interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@methane
Copy link
Member

methane commented Oct 25, 2016

BPO 28532
Nosy @vstinner, @ned-deily, @methane, @vadmium, @matrixise
PRs
  • [Do Not Merge] Convert Misc/NEWS so that it is managed by towncrier #552
  • Files
  • verbose-version.patch
  • verbose-version2.patch
  • verbose-version3.patch
  • vervose-version-doc.patch
  • vervose-version-doc2.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/methane'
    closed_at = <Date 2016-11-24.08:22:19.184>
    created_at = <Date 2016-10-25.17:51:01.399>
    labels = ['interpreter-core', 'easy', 'type-bug', '3.7']
    title = 'Show sys.version when -V option is supplied twice.'
    updated_at = <Date 2017-03-31.16:36:12.215>
    user = 'https://github.com/methane'

    bugs.python.org fields:

    activity = <Date 2017-03-31.16:36:12.215>
    actor = 'dstufft'
    assignee = 'methane'
    closed = True
    closed_date = <Date 2016-11-24.08:22:19.184>
    closer = 'methane'
    components = ['Interpreter Core']
    creation = <Date 2016-10-25.17:51:01.399>
    creator = 'methane'
    dependencies = []
    files = ['45221', '45272', '45276', '45585', '45608']
    hgrepos = []
    issue_num = 28532
    keywords = ['patch', 'easy']
    message_count = 16.0
    messages = ['279428', '279705', '279706', '279707', '279710', '279714', '279720', '281345', '281348', '281349', '281351', '281352', '281392', '281555', '281586', '281617']
    nosy_count = 6.0
    nosy_names = ['vstinner', 'ned.deily', 'methane', 'python-dev', 'martin.panter', 'matrixise']
    pr_nums = ['552']
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue28532'
    versions = ['Python 3.6', 'Python 3.7']

    @methane
    Copy link
    Member Author

    methane commented Oct 25, 2016

    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.

    @methane methane added the 3.7 (EOL) end of life label Oct 25, 2016
    @methane methane self-assigned this Oct 25, 2016
    @methane methane added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error easy labels Oct 25, 2016
    @matrixise
    Copy link
    Member

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

    @methane
    Copy link
    Member Author

    methane commented Oct 30, 2016

    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

    @matrixise
    Copy link
    Member

    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()

    @vadmium
    Copy link
    Member

    vadmium commented Oct 30, 2016

    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.

    @vadmium
    Copy link
    Member

    vadmium commented Oct 30, 2016

    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.

    @methane
    Copy link
    Member Author

    methane commented Oct 30, 2016

    Oh, it seems I hurried too much.
    Thanks to pointing it out.

    @methane
    Copy link
    Member Author

    methane commented Nov 21, 2016

    I noticed today is code freeze for final beta.
    Is this too late for 3.6.0?

    @vadmium
    Copy link
    Member

    vadmium commented Nov 21, 2016

    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?

    @vstinner
    Copy link
    Member

    verbose-version3.patch LGTM and seems useful to me.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 21, 2016

    New changeset fc6bb69cec05 by INADA Naoki in branch '3.6':
    Issue bpo-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 bpo-28532: Show sys.version when -V option is supplied twice
    https://hg.python.org/cpython/rev/02aa667bd02d

    @methane
    Copy link
    Member Author

    methane commented Nov 21, 2016

    Thanks for review.
    Since doc update is allowed after final beta, I committed verbose-version3.patch for now.

    Here is patch for doc.

    @vadmium
    Copy link
    Member

    vadmium commented Nov 21, 2016

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

    @methane
    Copy link
    Member Author

    methane commented Nov 23, 2016

    Elvis agreed to add "Other Improvements" section. (http://bugs.python.org/issue28635#msg281486)

    Here is new patch.

    @vadmium
    Copy link
    Member

    vadmium commented Nov 23, 2016

    Looks good to me

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 24, 2016

    New changeset 5a29ab5a4785 by INADA Naoki in branch '3.6':
    Issue bpo-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 bpo-28532: Add what's new entry for python -VV option
    https://hg.python.org/cpython/rev/3f9f13077ca8

    @methane methane closed this as completed Nov 24, 2016
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life easy interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants