lilypond-user
[Top][All Lists]
Advanced

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

Re: Python 3, was Re: ANN: Frescobaldi 2.19.0


From: David Wright
Subject: Re: Python 3, was Re: ANN: Frescobaldi 2.19.0
Date: Sun, 24 Apr 2016 16:21:15 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun 24 Apr 2016 at 10:00:38 (+0200), Urs Liska wrote:
> Am 24.04.2016 um 09:56 schrieb David Kastrup:
> > Noeck <address@hidden> writes:
> >>> So how do you define "the default"
> >> As written before: What ships with the default installation.
> > 
> > So python3 needs to be invoked using #!/usr/bin/python3 in the scripts
> > (what happens when Python 4 gets created), and we need to either support
> > Python2 and Python3 in parallel (including from GUB) _or_ make a hard
> > switch where we change _every_ script to use Python3 _and_ change GUB
> > from one version to the next.
> > 
> > _And_ Wols insists that he does _not_ want to use a common subset of
> > Python2 and Python3 even temporarily but do this right away using
> > Python3-only features.
> > 
> > Now having a separate prescribed #!/usr/bin/python3 shebang may seem to
> > make testing half-way reliable.  But in reality, the LilyPond code base
> > does not contain #!/usr/bin/python to any sizable degree (there is a
> > single script which might be an oversight) but instead address@hidden@
> > so again, there does not seem to be much of an alternative for an
> > all-or-nothing approach, and trying to mix this with making use of new
> > language features at the same time seems like a logistic nightmare.
> > 
> OK, but what happens when we face the situation that some distros have
> #!/usr/bin/python to Python 2 and other to Python 3?
> This is something we can't control at all, so at latest *then* we'd be
> in that situation, with the difference that *now* we have at least a
> chance to control the transition.

Has this not already happened? The rationale for PEP394 was
"This recommendation is needed as, even though the majority of
distributions still alias the python command to Python 2, some now
alias it to Python 3 ( [5] ). As some of the former distributions did
not provide a python2 command by default, there was previously no way
for Python 2 code (or any code that invokes the Python 2 interpreter
directly rather than via sys.executable ) to reliably run on all
Unix-like systems without modification, as the python command would
invoke the wrong interpreter version on some systems, and the python2
command would fail completely on others."

...which refers to https://www.archlinux.org/news/python-is-now-python-3/

>From https://wiki.archlinux.org/index.php/python of 7 April:
"Any program requiring Python 2 needs to point to /usr/bin/python2,
instead of /usr/bin/python, which points to Python 3. To do so, open
the program or script in a text editor and change the first line. The
line will show one of the following:
#!/usr/bin/env python or #!/usr/bin/python
In both cases, just change python to python2 and the program will then
use Python 2 instead of Python 3."

Jumping the gun a bit...

Cheers,
David.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]