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

Re: FYI: Python 3 migration of distributuion



On 11/13/19 6:11 PM, Charles Cazabon wrote:
> Unfortunately, it's difficult to find the hours to devote to this task.  I
> don't know when, or even if, I could have a beta release ready.
> 
>> If you convert python 2 code for 2.7 style, then we can support both
>> python 2 and 3.
> 
> I'm not very interested in doing this, as it means not using a lot of 3.x
> features, or not using them in the most Pythonic way.  My thought was that
> this project would target at least Python 3.7; anyone who didn't want to run
> 3.7 could still run "legacy" getmail under Python 2.7.
> 
> Charles

Hi Charles,

Please allow me to comment on this.

Converting some Python 2.7 code to Python 3.x is not very hard for
anyone who's a little bit trained to it. Most of the time, we see the
same patterns over and over again. So it would be relatively easy for a
lot of us to help you transition the current code to Python 3.x, without
even the need to understand much about getmail itself. Add to this that
there's automated tools to do the most boring part of it (like sixer,
and someone mentioned another one which I can't remember).

I had a quick look into Getmail's code, and it looks very similar to
what I've seen in other programs. Lots of print statements that needs to
be converted, a bit of except to patch, a few itertools too. The code is
also of quite a manageable size (by that I mean: it's a lot smaller than
lots of other stuff I converted to Py3 in a few hours...).

Some of us are offering such a help, and quickly, if you accept the
patches, you'll be able to have Getmail in a good enough shape so it can
stay in Debian, Ubuntu, Fedora.

On the opposite side, if you attempt to do a huge rework of Getmail
(which is maybe needed, I don't know Getmail enough to be able to tell),
probably nobody else but you will be able to do it, and you wont get
much help. As you wrote it may take some time, and you aren't even able
to predict how much.

So, why don't you just take the offer, get the Python 3.x patches in,
and then *later* do your rework, maybe in a version 6 of Getmail? This
sounds a much more reasonable approach to me.

Note that I'm not at all involved in Getmail or I'm not even a user, I'm
just trying to convince you to do the right move here... on the
direction which I believe will serve your users best, for example have
Getmail stay on the next Ubuntu 20.04 LTS (Debian Bullseye is for in 2
years, so you may have more time for that one...).

Cheers,

Thomas Goirand (zigo)


Reply to: