From: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
To: "Burton, Ross" <ross.burton@intel.com>,
Alexander Kanavin <alexander.kanavin@linux.intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] python: make python2 and python3 alternatives to python
Date: Tue, 18 Apr 2017 11:44:31 +0300 [thread overview]
Message-ID: <1492505071.7102.5.camel@linux.intel.com> (raw)
In-Reply-To: <CAJTo0LYA8nsexqtfwz4bbOYA1HtnRDxCcKGZE8Jz+m+=tOcTdA@mail.gmail.com>
On Thu, 2017-04-13 at 15:47 +0100, Burton, Ross wrote:
>
> On 13 April 2017 at 11:15, Alexander Kanavin <alexander.kanavin@linux
> .intel.com> wrote:
> > This runs against upstream recommendation and common distro
> > practice. And it will break scripts that have not been ported to
> > Python 3. Please fix the scripts instead to refer to python 3
> > whenever possible.
> >
>
> Agreed. If a script uses /usr/bin/python and gets py3, 99% of the
> time you'll get errors.
I've just checked PEP-349. It recommends that
"- The more general python command should be installed whenever any
version of Python 2 is installed and should invoke the same version of
Python as the python2 command (however, note that some distributions
have already chosen to have python implement the python3 command; see
the Rationale and Migration Notes below)."
The proposed patch doesn't violate this recommendation, because
"whenever" Python 2 is installed the python command still invokes
python2.
Also, there are other recommendations like
"- In order to tolerate differences across platforms, all new code that
needs to invoke the Python interpreter should not specify python , but
rather should specify either python2 or python3 (or the more specific
python2.x and python3.x versions; see the Migration Notes ). This
distinction should be made in shebangs, when invoking from a shell
script, when invoking via the system() call, or when invoking in any
other context.
- One exception to this is scripts that are deliberately written to be
source compatible with both Python 2.x and 3.x. Such scripts may
continue to use python on their shebang line without affecting their
portability."
If I understood correctly OE-core is not a distribution, but a tool to
create "a custom one". I would rather allow people to create
distributions where python3 is the default like in Arch Linux.
BR,
Dmitry
next prev parent reply other threads:[~2017-04-18 8:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 8:33 [PATCH] python: make python2 and python3 alternatives to python Dmitry Rozhkov
2017-04-13 10:15 ` Alexander Kanavin
2017-04-13 10:18 ` Alexander Kanavin
2017-04-13 14:47 ` Burton, Ross
2017-04-18 8:44 ` Dmitry Rozhkov [this message]
2017-04-18 9:33 ` Burton, Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1492505071.7102.5.camel@linux.intel.com \
--to=dmitry.rozhkov@linux.intel.com \
--cc=alexander.kanavin@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox