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: store app file type ignores command-line arguments
Type: behavior Stage: resolved
Components: Installation, Windows Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steve.dower Nosy List: eryksun, miss-islington, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2021-11-26 06:16 by eryksun, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 29799 merged steve.dower, 2021-11-26 18:20
PR 29807 merged miss-islington, 2021-11-26 23:08
PR 29808 merged miss-islington, 2021-11-26 23:08
Messages (5)
msg407029 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2021-11-26 06:16
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.
msg407079 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-11-26 18:23
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
msg407104 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-11-26 23:08
New changeset 4841e694ee1686f8c933ddfcb8c854915867ce17 by Steve Dower in branch 'main':
bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799)
https://github.com/python/cpython/commit/4841e694ee1686f8c933ddfcb8c854915867ce17
msg407108 - (view) Author: miss-islington (miss-islington) Date: 2021-11-26 23:30
New changeset 3dcbe01dc5236fb77d8c0133fb7e6bdd0754768a by Miss Islington (bot) in branch '3.10':
bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799)
https://github.com/python/cpython/commit/3dcbe01dc5236fb77d8c0133fb7e6bdd0754768a
msg407110 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-11-26 23:43
New changeset 133fb267f437f9bd568738d0e0e59e574fc82b02 by Miss Islington (bot) in branch '3.9':
bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799)
https://github.com/python/cpython/commit/133fb267f437f9bd568738d0e0e59e574fc82b02
History
Date User Action Args
2022-04-11 14:59:52adminsetgithub: 90059
2021-11-26 23:54:58steve.dowersetstatus: open -> closed
assignee: steve.dower
resolution: fixed
stage: patch review -> resolved
2021-11-26 23:43:20steve.dowersetmessages: + msg407110
2021-11-26 23:30:48miss-islingtonsetmessages: + msg407108
2021-11-26 23:08:34miss-islingtonsetpull_requests: + pull_request28040
2021-11-26 23:08:30miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request28039
2021-11-26 23:08:29steve.dowersetmessages: + msg407104
2021-11-26 18:23:24steve.dowersetmessages: + msg407079
2021-11-26 18:20:12steve.dowersetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request28034
2021-11-26 06:16:47eryksuncreate