[issue40667] [Windows] Add global python and python3 commands

2020-05-27 Thread Steve Dower
Steve Dower added the comment: After thinking this through some more, I don't think this solves the problem, but only changes it. And we're better off leaving things as they are than just moving them around. -- resolution: -> rejected stage: patch review -> resolved status: open ->

[issue40667] [Windows] Add global python and python3 commands

2020-05-19 Thread Steve Dower
Steve Dower added the comment: > To avoid this, process() can set a flag based on the image name that prevents > calling maybe_handle_shebang(). Or the other solution, which is stop treating "usr/bin/env" as "search PATH" - I'm sure there's another issue open somewhere saying this is the be

[issue40667] [Windows] Add global python and python3 commands

2020-05-19 Thread Eryk Sun
Eryk Sun added the comment: If .py files are associated with py.exe, handling the shebang "#!/usr/bin/env python[3]" might spawn the python[3].exe launcher recursively if it handles shebangs (see bpo-40687). To avoid this, process() can set a flag based on the image name that prevents callin

[issue40667] [Windows] Add global python and python3 commands

2020-05-19 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +19517 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20226 ___ Python tracker ___

[issue40667] [Windows] Add global python and python3 commands

2020-05-18 Thread Steve Dower
Steve Dower added the comment: Oh, and there certainly won't be a python2.exe :) -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue40667] [Windows] Add global python and python3 commands

2020-05-18 Thread Steve Dower
Steve Dower added the comment: The self-name checking is not something I'm volunteering to write, btw, nor any new options. But feel free to put those up as separate issues. I'm also not getting into symbolic links here - WiX doesn't support them natively, and custom actions are the source o

[issue40667] [Windows] Add global python and python3 commands

2020-05-18 Thread Zachary Ware
Zachary Ware added the comment: I'm in favor of this. I especially want this with the self-name-checking that Eryk mentioned, and even more if each installed Python adds its own symlink to `py.exe` with its own version (i.e. the Python 3.9 installer adds `python3.9.exe -> py.exe`). I'm goo

[issue40667] [Windows] Add global python and python3 commands

2020-05-18 Thread Eryk Sun
Eryk Sun added the comment: > For "python.exe", run as "py.exe", which is subject to shebangs, > VIRTUAL_ENV, and PY_PYTHON. Maybe in the "python[w].exe" case, it should skip shebang processing. That way only py[w].exe would handle shebangs, such as for the template command that gets install

[issue40667] [Windows] Add global python and python3 commands

2020-05-18 Thread Eryk Sun
Eryk Sun added the comment: > these may overtake people's existing installs and replace them > with something more clever (this annoys people) In particular, installing the launchers to %SystemRoot% means that in some contexts, such as the search path that CreateProcessW and SearchPathW use,

[issue40667] [Windows] Add global python and python3 commands

2020-05-18 Thread Steve Dower
New submission from Steve Dower : So I'm totally sick of being abused on the internet about the whole PATH issue, and want to put this up as an alternative. I'm willing to do the work, but I'm worried that my emotional state about the whole thing is blinding me to obvious issues. In short, ad