lilypond-devel
[Top][All Lists]
Advanced

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

Re: ancient convert rules


From: Carl Sorensen
Subject: Re: ancient convert rules
Date: Sun, 30 Aug 2020 09:16:29 -0600

On Sun, Aug 30, 2020 at 9:02 AM Jonas Hahnfeld <hahnjo@hahnjo.de> wrote:

> For https://gitlab.com/lilypond/lilypond/-/issues/6024, I've been
> looking at python/convertrules.py and wonder if we really need all
> ancient rules starting from version 0.1.9. Right now, a majority of
> these won't even apply because Python 3 is much pickier about bad
> escape codes in the regular expressions. Example:
>     re.sub('\\musicalpitch', '\\pitch', s)
> is wrong because \\ only escapes for the string and neither \m nor \p
> are correct escapes in a regular expression. For this case, it's easy
> to fix with raw strings and I think I was able to resolve most errors
> so that all rules are able to run, but I've no way to guarantee that my
> edits are correct.
>
> To make the story short: Can we maybe instead drop any rules older than
> 2.12.0? Its last minor release 2.12.3 is more than 10 years ago.
>

What if we kept a legacy convert.ly that went from the origin to, say
2.12.0 that was still Python 2 based?  And then had the new, Python 3-based
convert.ly start from 2.12.0?

This would provide a way for anybody who needed to get old source code up
to the current standard to do so, and would eliminate the burden of
converting the whole file to Python 3.

Thanks,

Carl


reply via email to

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