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: Python launcher on Windows does not work with --list or --list-paths
Type: behavior Stage: resolved
Components: Windows Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: bgerrity, brett.cannon, eryksun, miss-islington, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2018-07-06 18:13 by brett.cannon, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8815 closed python-dev, 2018-08-19 02:46
PR 8827 merged bgerrity, 2018-08-19 22:20
PR 9015 merged miss-islington, 2018-08-31 15:16
Messages (5)
msg321187 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2018-07-06 18:13
When you run `py -h` it says you can use -0 or --list as well as -0p or --list-paths, but both --list and --list-paths don't work (the -0-based options do, though).
msg321189 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2018-07-06 19:21
I don't think the launcher has unit tests.

The if statement in process() that calls show_python_list only checks for "-0". It needs to check for the long names as well, e.g.:

    if (argc == 2) {
        /* First check for -0[p], --list, or --list-paths. */
        if (!wcsncmp(p, L"-0", 2) || !wcscmp(p, L"--list") ||
            !wcscmp(p, L"--list-paths")) {
            valid = show_python_list(argv);
        }
    }

show_python_list shouldn't need to be modified. It already looks for -0p and --list-paths to include paths in the output format.
msg324429 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2018-08-31 15:15
New changeset aada63b20ec64bbfc4f2fb0718fc563eedbdd36a by Steve Dower (Brendan Gerrity) in branch 'master':
bpo-34062: Add missing launcher argument and make behavior consistent between short and long arguments (GH-8827)
https://github.com/python/cpython/commit/aada63b20ec64bbfc4f2fb0718fc563eedbdd36a
msg324432 - (view) Author: miss-islington (miss-islington) Date: 2018-08-31 15:32
New changeset 5df3658f2db1585607d41c25093a2a7d2a4de347 by Miss Islington (bot) in branch '3.7':
bpo-34062: Add missing launcher argument and make behavior consistent between short and long arguments (GH-8827)
https://github.com/python/cpython/commit/5df3658f2db1585607d41c25093a2a7d2a4de347
msg324434 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2018-08-31 15:56
Thanks, Brendan!
History
Date User Action Args
2022-04-11 14:59:02adminsetgithub: 78243
2018-08-31 15:56:39steve.dowersetstatus: open -> closed
resolution: fixed
messages: + msg324434

stage: patch review -> resolved
2018-08-31 15:32:26miss-islingtonsetnosy: + miss-islington
messages: + msg324432
2018-08-31 15:16:02miss-islingtonsetpull_requests: + pull_request8483
2018-08-31 15:15:47steve.dowersetmessages: + msg324429
2018-08-28 18:21:06bgerritysetnosy: + bgerrity
2018-08-19 22:20:39bgerritysetpull_requests: + pull_request8306
2018-08-19 02:46:39python-devsetkeywords: + patch
stage: test needed -> patch review
pull_requests: + pull_request8293
2018-07-06 19:21:27eryksunsetnosy: + eryksun
messages: + msg321189
2018-07-06 18:13:30brett.cannoncreate