Re: [RFC] tests: Switch default python version to 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2019-02-12 at 16:43 +0200, Jouni Malinen wrote:
> On Tue, Feb 12, 2019 at 05:59:40PM +0900, Masashi Honma wrote:
> > -#!/usr/bin/env python2
> > +#!/usr/bin/env python3
> 
> Wouldn't it be nicer to not require a specific version to be used, i.e.,
> change that to "python" instead of "python3"? I'm not sure how common it
> is for python3 to be installed nowadays if python2 is available (I'd
> guess that would be very common, but I have no data to back that
> assumption), so this may not be much of a concern. Anyway, the reason
> for that current "python2" there is in the scripts previously not
> supporting python3.

Well, for the most part, 'python' just points to 'python2' anyway, this
was also codified in python:

https://www.python.org/dev/peps/pep-0394/

 * for the time being, all distributions should ensure that python, if
   installed, refers to the same target as python2, unless the user
   deliberately overrides this or a virtual environment is active.
 * however, end users should be aware that python refers to python3 on
   at least Arch Linux (that change is what prompted the creation of
   this PEP), so python should be used in the shebang line only for
   scripts that are source compatible with both Python 2 and 3.

On the other hand, python3 is going to be available on all systems that
have it installed, and it seems likely that all distros ship it?

> The only benefit I see in forcing python3 here is to make it less likely
> that new changes break python3 compatibility (at the cost of making it
> more likely for python2 compatibility to be broken). I'd hope there
> would be a nicer way of doing that, though, than moving from enforcing
> one version of the language to enforcing another version.

I'm not sure why we should even bother supporting a language that's
going to be EOLed in less than a year though :-)

johannes


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux