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: launcher does not read shebang line when arguments are given
Type: enhancement Stage: resolved
Components: Windows Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: amaury.forgeotdarc, python-dev, theller, vinay.sajip, vstinner
Priority: normal Keywords: patch

Created on 2013-01-25 10:56 by theller, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
launcher.patch theller, 2013-01-25 10:56 review
Messages (7)
msg180565 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2013-01-25 10:56
The python launcher does not parse the shebang if arguments for the Python interpreter are given on the command line.  For example:

py.exe test.py # uses shebang line
py.exe -u test.py # does NOT use shebang line

The attached patch fixes this.
msg180895 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2013-01-29 08:40
Hope it is ok to assign this to you, vinay.
msg180954 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-01-29 22:29
New changeset 0880e0f859e0 by Vinay Sajip in branch 'default':
Closes #17028: Allowed Python arguments to be supplied to launcher.
http://hg.python.org/cpython/rev/0880e0f859e0
msg180995 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2013-01-30 21:59
An entry in Misc/NEWS would be nice.
msg180996 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-01-30 22:19
A test would also be nice :-)
msg180997 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-01-30 22:26
New changeset 58e72cb89848 by Vinay Sajip in branch 'default':
Updated NEWS with fix for #17028.
http://hg.python.org/cpython/rev/58e72cb89848
msg181009 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2013-01-31 08:26
> A test would also be nice :-)

I do test the launcher in a standalone environment, but it's not straightforward to test in a standard build or buildbot environment. For example, it needs 4 sets of Python (Python 2.x and 3.x, 32-bit and 64-bit builds for each) setup in the Windows registry.

The test script I use is at

https://bitbucket.org/vinay.sajip/pylauncher/src/tip/tests.py
History
Date User Action Args
2022-04-11 14:57:40adminsetgithub: 61230
2013-01-31 08:26:07vinay.sajipsetmessages: + msg181009
versions: + Python 3.4
2013-01-30 22:26:58python-devsetmessages: + msg180997
2013-01-30 22:19:06vstinnersetnosy: + vstinner
messages: + msg180996
2013-01-30 21:59:02amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg180995
2013-01-29 22:29:38python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg180954

resolution: fixed
stage: patch review -> resolved
2013-01-29 08:40:24thellersetassignee: vinay.sajip

messages: + msg180895
nosy: + vinay.sajip
2013-01-25 17:20:37thellersettitle: launcher -> launcher does not read shebang line when arguments are given
2013-01-25 10:56:24thellercreate