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 Alexandros Karypidis
Recipients Alexandros Karypidis, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Date 2019-12-11.18:49:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576090152.21.0.771099655459.issue38999@roundup.psfhosted.org>
In-reply-to
Content
My suggestion to gradually fall back from most specific to least specific version, was an attempt to reconcile the input from various viewpoints.

I think that ideally the behaviour should be as close to UNIX as possible. This means that it should just search the path for that binary (which is the whole point of using /usr/bin/env) and use it (even if it is the wrong version).

While I understand that one can do more (verify the version in whatever executable is located, etc) there is a lot in favor of consistency across platforms (versus even better behavior).

So my vote if the community decides to address this would be to just "search the path for <whatever>.exe when encountering #!/usr/bin/env <whatever>" and then launch it and hope for the best.

This makes it simple for users to intervene via the PATH (which is the whole point of /usr/bin/env) and launch whatever they want. 

Currently, creatign a venv on windows only places "python.exe" in the Scripts folder (another difference to Linux). I would argue this is "correct" though because I think this was a decision of DISTROS (to use python for version 2 and python3 for version 3, while undertransition). Most distros still do that to this day and it will likely stick around. One day there will be only "python" and it will mean "version 3" but until then, it's better for the py launcher to do the same as on Linux and say "could not find python3 in the path" where the user can intervene (e.g. copy python.exe as python3.exe) and "fix" it manually.

Of course, doing "smarter" things on Windows is always an option but I would say that at least the "minimal" should be done to support consistency. (As I said, I would also suggest that no more than this minimal be done, but not in order to keep implementation simple, but to keep it consistent with other platforms).

Then again, that's merely one point of view from someone who is a user and does not even contribute to the project...
History
Date User Action Args
2019-12-11 18:49:12Alexandros Karypidissetrecipients: + Alexandros Karypidis, paul.moore, tim.golden, zach.ware, eryksun, steve.dower
2019-12-11 18:49:12Alexandros Karypidissetmessageid: <1576090152.21.0.771099655459.issue38999@roundup.psfhosted.org>
2019-12-11 18:49:12Alexandros Karypidislinkissue38999 messages
2019-12-11 18:49:11Alexandros Karypidiscreate