Re: [PATCH] python: prioritize python 3.x over 2.x

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.sysutils.automake.patches
Message-ID <YfINHUaxIMtcbPv7@vapier>
On 26 Jan 2022 10:07, Zack Weinberg wrote:
> On Wed, Jan 26, 2022, at 6:37 AM, Mike Frysinger wrote:
> > Since Python 2.x went EOL years ago, stop searching for it before
> > any of the Python 3 versions.
> 
> +1
> 
> >    m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
> > -[python python2 python3 dnl
> > +[python python3 dnl
> >   python3.15 python3.14 python3.13 python3.12 python3.11 python3.10 dnl
> >   python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl
> >   python3.2 python3.1 python3.0 dnl
> > + python2 dnl
> >   python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl
> >   python2.0])
> 
> Please also move the plain "python" command down to the python2 block (right after "python2" would be the best place I think).  Any system on which "python" runs Python 3 is grossly misconfigured.

i don't think that's accurate.  Python PEP-0394 explicitly permits `python` to
be any version, and many distros do just that -- whatever the latest version of
Python 3 installed.  distros that remove `python` entirely as part of Python 2
removal are doing it wrong.

if your argument is that language incompatibilities make supporting Python 2 and
Python 3 with a single interpreter name either difficult or impossible (due to
incompatible syntax changes), i'll remind you that Python 3 is not actually that
much better here.  the Python 3.0 - 3.8 series might have been *mostly* stable
to try and encourage people to migrate off of Python 2.7, there were versions
that changed syntax and broke things, and it's only going to get worse now that
Python 2.7 is "gone".  off the top of my head, Python 3.5 added type hints, and
Python 3.7 added async/await keywords.  both of those completely break in older
versions of Python 3.

so i think it's entirely appropriate that `python` be first, and stay there.
-mike
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmHyDR0ACgkQQWM7n+g3
9YFcdw/9HmsRGbb2h6CunjG5JxKJIWn4WhZZBV7TwvnHps9+RnYsBV4NNy9lMGoj
xIcPn6JrZjdT2DLazpL9o6o9VZIYFKyhK1Q9DsB9II7pKsSQS1qlT6+lGcB/Ushx
sCcmS1buQ9KxNoo2iMOa1RVvBPptsQBond2GNHxQK9WV1Ejfuqt0CQB1HVoKp2qb
yOVMmuCAYhdLuhNXZN+EjuzVbSjOHfp8vSAo3QWMEtyNaOOGpZaRMGcDOjjzH4ru
ACoiu+WGrsgVo2a3GarctYGdwfLJtynNx9DiRrr2dZC+QoKrjcVXQ6fOwivdtesL
iAcuEN/XEK60neXw+bl82a8Pf38KebYBozh1GjmwWIUoGXZkRaPyG1CCi8fd3tcs
Q8ijYsvondOrdTPKP5Zr46RHTqhdLiouML5IeXKK3CSel3C6dcp9phe374edmSzP
v2a+keSwrwy2EWmq7qk39w5LHcMbSjS/MzcnLV97DVZdc8gXdgKTpesvYVAbPom2
e3lVdBrFb4bq/q0r5MQw0j1IquvWvwdVhNCDvUqefPM9Z5BaAYyBAG1IbqSGHeWD
pneTRH74wpS7t+9mQN1rLGFQUz0DyjYrpq9jjihqpKTaichlMf5qfbEgxiy169n2
Xk9DZEkLedeQE/NS5u65bsrkS3CMlMktHAaeC1uBSEN5DM08S0U=
=/1eK
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.