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

store app file type ignores command-line arguments #90059

Closed
eryksun opened this issue Nov 26, 2021 · 5 comments
Closed

store app file type ignores command-line arguments #90059

eryksun opened this issue Nov 26, 2021 · 5 comments
Assignees
Labels
3.9 only security fixes 3.10 only security fixes 3.11 bug and security fixes OS-windows topic-installation type-bug An unexpected behavior, bug, or error

Comments

@eryksun
Copy link
Contributor

eryksun commented Nov 26, 2021

BPO 45901
Nosy @pfmoore, @tjguk, @zware, @eryksun, @zooba, @miss-islington
PRs
  • bpo-45901: Fixes argument passing when invoking .py files directly through the Store package #29799
  • [3.10] bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799) #29807
  • [3.9] bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799) #29808
  • 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/zooba'
    closed_at = <Date 2021-11-26.23:54:58.564>
    created_at = <Date 2021-11-26.06:16:47.021>
    labels = ['type-bug', 'expert-installation', '3.9', '3.10', '3.11', 'OS-windows']
    title = 'store app file type ignores command-line arguments'
    updated_at = <Date 2021-11-26.23:54:58.564>
    user = 'https://github.com/eryksun'

    bugs.python.org fields:

    activity = <Date 2021-11-26.23:54:58.564>
    actor = 'steve.dower'
    assignee = 'steve.dower'
    closed = True
    closed_date = <Date 2021-11-26.23:54:58.564>
    closer = 'steve.dower'
    components = ['Installation', 'Windows']
    creation = <Date 2021-11-26.06:16:47.021>
    creator = 'eryksun'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45901
    keywords = ['patch']
    message_count = 5.0
    messages = ['407029', '407079', '407104', '407108', '407110']
    nosy_count = 6.0
    nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'eryksun', 'steve.dower', 'miss-islington']
    pr_nums = ['29799', '29807', '29808']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45901'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @eryksun
    Copy link
    Contributor Author

    eryksun commented Nov 26, 2021

    The file association for the store app uses '"%1"' for the command-line parameters. This ignores the rest of the command-line arguments, i.e. '%'. In PC/layout/support/appxmanifest.py, the add_application() calls that add the "Python" and "PythonW" applications should be changed to use the parameters string '"%1" %' in the file types.

    @eryksun eryksun added 3.9 only security fixes 3.10 only security fixes 3.11 bug and security fixes topic-installation OS-windows type-bug An unexpected behavior, bug, or error labels Nov 26, 2021
    @zooba
    Copy link
    Member

    zooba commented Nov 26, 2021

    For future reference, in case someone stumbles over this issue, here's how I tested this change:

    • set $env:IncludeUWP="true"
    • did a regular PCbuild/build.bat
    • generated a Store layout with "./python.bat PC/layout --preset-appx --copy ./out"
    • mock-installed it with "Add-AppxPackage -Register ./out/appxmanifest.xml"
    • used "Default Programs" to change my default to the new installed Python 3.11
    • put "import sys; print(sys.argv); input()" into test.py
    • ran "test.py arg1 arg2" and inspected the output

    @zooba
    Copy link
    Member

    zooba commented Nov 26, 2021

    New changeset 4841e69 by Steve Dower in branch 'main':
    bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799)
    4841e69

    @miss-islington
    Copy link
    Contributor

    New changeset 3dcbe01 by Miss Islington (bot) in branch '3.10':
    bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799)
    3dcbe01

    @zooba
    Copy link
    Member

    zooba commented Nov 26, 2021

    New changeset 133fb26 by Miss Islington (bot) in branch '3.9':
    bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799)
    133fb26

    @zooba zooba closed this as completed Nov 26, 2021
    @zooba zooba self-assigned this Nov 26, 2021
    @zooba zooba closed this as completed Nov 26, 2021
    @zooba zooba self-assigned this Nov 26, 2021
    @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.9 only security fixes 3.10 only security fixes 3.11 bug and security fixes OS-windows topic-installation type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants