lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <14b7cc52-5814-36d6-2625-5aa7eea20082@darmarit.de>
Date:   Fri, 6 Sep 2019 18:41:17 +0200
From:   Markus Heiser <markus.heiser@...marit.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jonathan Corbet <corbet@....net>
Cc:     Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        Linux Media Mailing List <linux-media@...r.kernel.org>,
        Mauro Carvalho Chehab <mchehab@...radead.org>,
        Joe Perches <joe@...ches.com>, linux-kernel@...r.kernel.org,
        Jessica Yu <jeyu@...nel.org>,
        Federico Vaga <federico.vaga@...a.pv.it>,
        Thomas Gleixner <tglx@...utronix.de>, linux-doc@...r.kernel.org
Subject: Re: [PATCH] docs: license-rules.txt: cover SPDX headers on Python
 scripts


Am 05.09.19 um 16:17 schrieb Greg Kroah-Hartman:
> 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@...nel.org> 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?  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.

As far as I know: many distros have installed py3 and py2 interpreter
by default.  Mostly for internal purpose the distros use the py3 but
the 'python' command is default binded to a py2 interpreter.

About Linux distros and python2 & python3 read:

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

In short: command 'python' mostly refers to py2 interpreters as long as py2 is
supported, later the distros will remove the python2 stack.  So it depends on
the distro and your alternatives(8) setup.  The common rules for distros are:

   https://www.python.org/dev/peps/pep-0394/#for-python-runtime-distributors

and what debian says:

   https://debian-python.readthedocs.io/en/latest/debian-policy.html#versions

IMO we can't predict what the python command will call py2 or py3 interpreter.
And we scould not fergett that not all (build hosts) are using up to date

At least I have to say that it is always recommended to use a
virtualenv build up using requirements.txt and option

May we can and add option "-p python3" to:

 
https://www.kernel.org/doc/html/latest/doc-guide/sphinx.html?highlight=virtualenv#sphinx-install

  $ virtualenv -p python3 sphinx_1.7.9
  $ . sphinx_1.7.9/bin/activate
  (sphinx_1.7.9) $ pip install -r Documentation/sphinx/requirements.txt

BTW: I always recomend to use (support) up-to-date py-packages, but we had
this discussion already.

  -- Markus --

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ