lilypond-devel
[Top][All Lists]
Advanced

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

Re: switching to Python 3.x


From: David Kastrup
Subject: Re: switching to Python 3.x
Date: Mon, 06 Jan 2020 19:32:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Jonas Hahnfeld <address@hidden> writes:

> Am Donnerstag, den 19.12.2019, 20:13 +0100 schrieb Jonas Hahnfeld:
>> Hello friends of Python 3!
>> 
>> to make the initial proposal short: With today's patches, I think
>> 'master' would be ready to switch over to Python 3.x.

>> 1) Adapt the build system to find and require Python 3.
>> patch: 
>> https://codereview.appspot.com/545370043
>> 
>> 2) The largest part of the switch is running 2to3 which is now able to
>> handle the rest of the conversion automatically. For reference, changes
>> for current 'master' are here: 
>> https://codereview.appspot.com/573340043
>> 
>> 3) Fix-up two places in the scripts afterwards:
>> 3a) Remove the call to sys.setdefaultencoding which doesn't exist in
>> Python 3.x (and is only available right now because of a dirty hack).
>> 3b) Replace cgi.escape by html.escape. While not strictly needed, I
>> think we should include this change because they removed cgi.escape in
>> Python 3.8 after only deprecating it in Python 3.2. The replacement
>> html.escape is only available since that Python 3.2, so we can't do
>> this before switching.
>> patch: 
>> https://codereview.appspot.com/561270043
>> 
>> 
>> One point worth discussing is the future minimum version of Python 3.x.
>> In the patch, I'm proposing Python 3.5 because it will allow us to
>> address a few deprecation warnings, especially about module 'imp'.
>> It should be available in most Linux distributions:
>>  * CentOS 7 provides Python 3.6 since some minor releases
>>  * Debian 9 (Stretch) has packages for Python 3.5, Debian 10 (Buster)
>> even for Python 3.6
>>  * Ubuntu 16.04 LTS has Python 3.5, version 18.04 LTS has Python 3.6
>> 
>> Debian 8 (Jessie) only has Python 3.4, but even its LTS support will
>> end next June (2020-06). Would it be acceptable to drop support for
>> this distribution building 'master'?
>> On the GUB side, I already added a spec for Python 3.7.4 (also for
>> Windows via binary packages) and this worked successfully in September.
>> Is there a major distribution missing that doesn't provide at least
>> Python 3.5?
>> 
>> Let me know what you think!
>
> So far, I've only received a single (positive) response off-list and a
> bit of feedback on the posted patches. What do others think?
> To make this explicit: The proposal is to drop support for Python 2
> (now EOL), requiring everyone wishing to build LilyPond 'master' to
> have an appropriate version of Python 3 available. This should be
> sufficiently easy (see above), but I'd like to have consensus on this.

When we switch over GUB, we also need to switch over the 2.20 branch.
It's not just master that is affected.

-- 
David Kastrup



reply via email to

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