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 eryksun
Recipients eryksun, lukasz.langa, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-05-18.15:00:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589814019.53.0.555670779389.issue40667@roundup.psfhosted.org>
In-reply-to
Content
> 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, the launcher commands will take precedence over %PATH%.

> shebang lines will start being noticed
> "python3.exe" could launch Python 2, but I'm not too concerned by this

The launcher can get the name of the current process to restrict its behavior. For "python3.exe", run as "py.exe -3", which is subject to PY_PYTHON3. For "python2.exe", run as "py.exe -2", which is subject to PY_PYTHON2. For "python.exe", run as "py.exe", which is subject to shebangs, VIRTUAL_ENV, and PY_PYTHON.

Since the loader doesn't resolve symbolic links, these extra names can actually just be symlinks if the filesystem supports them and the installer is allowed to create them. If installing the launchers to %SystemRoot%, the filesystem must be NTFS and we must have admin access, so symlinks should be supported.

> these add an extra process in the chain, which can break callers 
> who need the process ID/handle

The launcher could facilitate finding the image path when programs need to spawn the interpreter directly as a child process. Maybe when running as "python2.exe" and "python3.exe", the launcher's -0p option could print just the image path that it would execute instead of the list of installed versions.
History
Date User Action Args
2020-05-18 15:00:19eryksunsetrecipients: + eryksun, paul.moore, tim.golden, lukasz.langa, zach.ware, steve.dower
2020-05-18 15:00:19eryksunsetmessageid: <1589814019.53.0.555670779389.issue40667@roundup.psfhosted.org>
2020-05-18 15:00:19eryksunlinkissue40667 messages
2020-05-18 15:00:19eryksuncreate