Re: [PATCH] docs: license-rules.txt: cover SPDX headers on Python scripts

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

 



Em Thu, 5 Sep 2019 16:17:23 +0200
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> escreveu:

> On Thu, Sep 05, 2019 at 06:57:01AM -0600, Jonathan Corbet wrote:
> > On Thu,  5 Sep 2019 06:23:13 -0300
> > Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx> wrote:
> >   
> > > Python's PEP-263 [1] dictates that an script that needs to default to
> > > UTF-8 encoding has to follow this rule:
> > > 
> > > 	'Python will default to ASCII as standard encoding if no other
> > > 	 encoding hints are given.
> > > 
> > > 	 To define a source code encoding, a magic comment must be placed
> > > 	 into the source files either as first or second line in the file'  
> > 
> > So this is only Python 2, right? 

Well, Debian 10 (buster) was launched this year, and still comes with python2
(with is the default):

	$ ls -la /usr/bin/python
	lrwxrwxrwx 1 root root 7 Mar  4  2019 /usr/bin/python -> python2

I think Debian devs will keep it maintained for a while, as this is a LTS
distro.

> > Python 3 is UTF8 by default.  Given that
> > Python 2 is EOL in January, is this something we should be concerned
> > about?  Or should we instead be making sure that all the Python we have
> > in-tree works properly with Python 3 and be done with it?  
> 
> I recommend just using python 3 everywhere and be done with it as there
> are already many distros that default to that already.

Then we need to change the scripts, as they're currently pointing to
/usr/bin/python instead of /usr/bin/python3. At least on the distros I
use myself, this doesn't point to /etc/alternates. Instead, it is just
an alias to python2.

Thanks,
Mauro



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux