3 ms·
This would be a violation of the advice in PEP 394, except that PEP 394 only applies “to Unix-Like systems”. https://www.python.org/dev/peps/pep-0394/ https://
by pixelmonkey 6y ago
This would be a violation of the advice in PEP 394, except that PEP 394 only applies “to Unix-Like systems”.
https://www.python.org/dev/peps/pep-0394/ https://www.python.org/dev/peps/pep-0394/
Basically, the Python core team suggests that the “python” executable/command be set to one of the following:
- python2,
- python3,
- not provide python command,
- allow python to be configurable by an end user or a system administrator
It would have been much better, IMO, for Windows to do nothing here. A Microsoft-blessed Python installer from the Windows Store could actually serve a positive purpose distinct from the official installer at python.org. That would be to support python2 and python3 side-by-side cleanly.
It might nicely install Python 2.7.18 at the python2 executable, and install Python 3.8.2, as well, and have python/python3 refer to 3.8.2 and beyond.
This would match an Ubuntu 20.04 system with python2 installed, and with python-is-python3 installed, which is, IMO, how a system should be configured if it needs to have python2 around for backwards compatibility, but wants the “system/default python” to be python3. And it’d make sense for Microsoft to do that since Windows, above all, is a system with a deep respect for backward compatibility with old tools. But, that isn't what they did.
Instead, this stub forwarding to the Windows store seems like the worst of all worlds. I am not really sure what problem they are trying to solve and for whom. If you are the kind of Windows user who opens cmd.exe and manually types in “python” into the black terminal window, are you the kind of Windows user who won’t be able to figure out how to open a browser to the official installer on python.org? Doubt it. Meanwhile, the stub likely breaks existing code, even code that may just be running “python -V” to see what version is installed at that path.
And apparently the Microsoft-blessed Python installer is just a python3 install (perhaps old), with no thought to python2 and backwards compatibility for old python scripts for Windows? Hmph. This doesn’t seem like an improvement over “do nothing”.