lilypond-devel
[Top][All Lists]
Advanced

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

Re: Please test gub


From: Alexander Kobel
Subject: Re: Please test gub
Date: Thu, 31 Jan 2019 15:39:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Hi,

On 31.01.19 15:21, David Kastrup wrote:
Knut Petersen <address@hidden> writes:

On 31.01.19 08:43, Alexander Kobel wrote:
Hi,

fails on Arch Linux (up-to-date, Intel Core i5-3317U).

First, all Python scripts seem to require Python2 (but python ->
python3 is the default on Arch).

I don't think that matches Python's own recommendation.  Has this
changed?

Kind of, yes, but then again, no, not really, it turns out. Lucky buzzwords for Google gave me PEP 394:
  https://www.python.org/dev/peps/pep-0394/

Relevant is the abstract, which in fact mentions that Arch, specifically, switched "early", broke the former practice (and, apparently, implicit and unwritten recommendation) and thus raised the discussion that led to PEP 394. It also says that "for the time being, all distributions should ensure that python, if installed, refers to the same target as python2, unless [...]".

*Also* relevant *now*, however, are the following point(s) from the recommendation:

"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."

and

"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."


I second the recommendation: as a happy year-long Archer, python shebangs are, by far, the number 1 of annoyances I encounter regularly. Whenever I can, I "correct" shebangs to python2 (without ever having looked up this PEP), and nobody ever complained that it breaks their workflow. On the other hand, I still occasionally use systems with Python2 <2.7 (strictly less than). Hence, I'd refrain from specifying a minor version if it can be avoided. AFAIK, 2.8 is promised to never appear, so it shouldn't matter for 2.x. And I don't have 3.y for y < 7 available on my system; yet, 3.3 scripts run perfectly albeit the author might not have thought about that version when writing the script.


Cheers,
Alex

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

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