[issue28686] py.exe ignored PATH when using python3 shebang

Riccardo Polignieri report at bugs.python.org
Wed Mar 18 17:12:06 EDT 2020


Riccardo Polignieri <ric.pol at libero.it> added the comment:

Three years later, this problem seems on the way to fix itself (https://xkcd.com/1822/).

Versioned shebangs (and versioned "/env" shebangs) used to be a more prominent issue when you needed a way to tell Python 2 / Python 3 scripts apart. With the sunset of Python 2.7-3.3 almost completed, now we have a reasonably homogeneous block of inter-compatible Pythons.
True, py.exe won't cope very well with versioned shebangs, but this seems to become less and less annoying by the day.

As for the other problem from issue 39785, ie Python 2 still being selected as "default" in deference to some arcane Linux convention that we have been dragging for ten years (even on Windows!)... it would be nice to finally have *that* fixed. 
But then again, having Python 2 installed on your Windows box is becoming increasingly rare. Most users are likely never hitting this weirdness any more. 



In the meantime, now we have yet another way of installing Python on Windows... versioned executables from the Store! With no py.exe! So, who knows, maybe py.exe is the past, versioned executable are the future...

To sum up, while I would certainly add a note to the docs, to clarify that py.exe does not support versioned "/env" shebangs, IMO today the work needed to specify a behaviour for all possible cases, possibly even extending/modifying Linux conventions, is just too much to be worth the effort.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28686>
_______________________________________


More information about the Python-bugs-list mailing list