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

Python launcher on Windows does not work with --list or --list-paths #78243

Closed
brettcannon opened this issue Jul 6, 2018 · 5 comments
Closed
Labels
3.7 (EOL) end of life 3.8 only security fixes OS-windows type-bug An unexpected behavior, bug, or error

Comments

@brettcannon
Copy link
Member

BPO 34062
Nosy @brettcannon, @pfmoore, @tjguk, @zware, @eryksun, @zooba, @miss-islington, @bgerrity
PRs
  • bpo-34062: Add missing launcher argument and make behavior consistent #8815
  • bpo-34062: Add missing launcher argument and make behavior consistent between short and long arguments #8827
  • [3.7] bpo-34062: Add missing launcher argument and make behavior consistent between short and long arguments (GH-8827) #9015
  • 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 = None
    closed_at = <Date 2018-08-31.15:56:39.883>
    created_at = <Date 2018-07-06.18:13:30.166>
    labels = ['3.8', 'type-bug', '3.7', 'OS-windows']
    title = 'Python launcher on Windows does not work with --list or --list-paths'
    updated_at = <Date 2018-08-31.15:56:39.882>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2018-08-31.15:56:39.882>
    actor = 'steve.dower'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-08-31.15:56:39.883>
    closer = 'steve.dower'
    components = ['Windows']
    creation = <Date 2018-07-06.18:13:30.166>
    creator = 'brett.cannon'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34062
    keywords = ['patch']
    message_count = 5.0
    messages = ['321187', '321189', '324429', '324432', '324434']
    nosy_count = 8.0
    nosy_names = ['brett.cannon', 'paul.moore', 'tim.golden', 'zach.ware', 'eryksun', 'steve.dower', 'miss-islington', 'bgerrity']
    pr_nums = ['8815', '8827', '9015']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue34062'
    versions = ['Python 3.7', 'Python 3.8']

    @brettcannon
    Copy link
    Member Author

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

    @brettcannon brettcannon added 3.7 (EOL) end of life 3.8 only security fixes OS-windows type-bug An unexpected behavior, bug, or error labels Jul 6, 2018
    @eryksun
    Copy link
    Contributor

    eryksun commented Jul 6, 2018

    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.

    @zooba
    Copy link
    Member

    zooba commented Aug 31, 2018

    New changeset aada63b 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)
    aada63b

    @miss-islington
    Copy link
    Contributor

    New changeset 5df3658 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)
    5df3658

    @zooba
    Copy link
    Member

    zooba commented Aug 31, 2018

    Thanks, Brendan!

    @zooba zooba closed this as completed Aug 31, 2018
    @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 3.8 only security fixes OS-windows type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants