[Python-ideas] Make py.exe default to Python 3

Paul Moore p.f.moore at gmail.com
Tue Mar 8 17:18:21 EST 2016


On 8 March 2016 at 22:00, Steve Dower <steve.dower at python.org> wrote:
> "First installed" is a very difficult proposition, especially if you want
> versions of Python pre-3.6 to participate. "Last installed" is slightly
> better, though not easy to do without triggering systems that detect
> corrupted installations.

Also, any dependency on installation order gets *very* messy if
someone installs and uninstalls various versions. What does the
default become if I uninstall the version that was previously the
first (or last) installed? Would we need to keep details of precisely
when everything was installed?

> Personally I think "latest version" is the best default (compared to the
> current "latest 2.x version"), so I'm +1 on removing the assumption that
> "PY_PYTHON" is "2" by default.

Latest version has the additional advantage of being essentially the
current behaviour, just with the special case of "but prefer Python 2
over Python 3 if both are present" removed. (Note that technically the
current rule is not simply "latest 2.x version", as if the user only
has Python 3 installed, the latest 3.x version is used).

The only other option I can think of is "use the one the user selected
as the default Python (i.e., introspect the association for ".py"
files) but even then we need a default default (!) for people who
don't select any default Python. It's also messy to implement. And
it's a bigger change from current behaviour.

> Users can change their own default with any of the mechanisms described at
> https://docs.python.org/3/using/windows.html#customization

Absolutely. This should *only* apply when there is no user
customisation - and it needs no further configurability, because the
current methods are perfectly sufficient.

Paul


More information about the Python-ideas mailing list