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.

Author steve.dower
Recipients lukasz.langa, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-05-18.09:06:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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, add a new option to the installer to "Add global python3.exe and python.exe commands". Also replace the current PATH option on the first page (not under Customize) with this. I'll also embed a "Learn More" link to the (new) doc page that explains the impact.

The option will pass an extra flag to the *launcher* installer to include more copies of py.exe, renamed to python3.exe and python.exe (we already pass a similar option to add file associations). These additional copies will be just as global as py.exe (depending on whether the user is admin or not) and obviously work identically.

Importantly, this does *not* drop an arbitrary/writable directory on PATH, and it keeps the DLLs out of the search path. 

There are some risks:
* these may overtake people's existing installs and replace them with something more clever (this annoys people)
* these add an extra process in the chain, which can break callers who need the process ID/handle (this annoys people)
* this won't put Scripts on PATH (this annoys people)
* changing anything at all annoys people
* would remove python3.dll and python39.dll from PATH (probably for the best), and also vcruntime*.dll (which is a *good* thing) and anything installed by packages/tools into sys.prefix (which is a *massive* security vulnerability)
* the help text for the launcher is not obvious above the help for the default Python interpreter
* shebang lines will start being noticed
* things should work in a venv because of both PATH and VIRTUALENV variables, but I'm not going to stake my life on this
* "python3.exe" could launch Python 2, but I'm not too concerned by this

I feel like this option is the best of a bad lot. But if people weigh in and say it's worse than doing nothing, then I'll do nothing.

(Including Łukasz in case he wants to veto adding this to 3.9 after beta 1. It's not a language change, and barely even an installer change - just a few optional copies of the existing launcher plus some docs. But as I mentioned above it *will* break some people.)
Date User Action Args
2020-05-18 09:06:49steve.dowersetrecipients: + steve.dower, paul.moore, tim.golden, lukasz.langa, zach.ware
2020-05-18 09:06:49steve.dowersetmessageid: <>
2020-05-18 09:06:49steve.dowerlinkissue40667 messages
2020-05-18 09:06:47steve.dowercreate