Re: FYI: Python 3 migration of distributuion

2020-10-21 Thread Moritz Mühlenhoff
On Tue, Nov 19, 2019 at 10:43:49PM +0900, Osamu Aoki wrote:
> On Sun, Nov 17, 2019 at 02:28:44PM +0900, Osamu Aoki wrote:
> > Hi,
> >
> > On Wed, Nov 13, 2019 at 11:11:43AM -0600, Charles Cazabon wrote:
> > > Osamu Aoki  wrote:
> > > >
> > > > Currently, getmail is a candidate for removal from the upcoming Debian
> > > > release if it is not updated to support python 3 by someone (not
> > > > necessary by upstream).
> > >
> > > Thanks for the update, Osamu.  I have actually been playing with a 
> > > prototype
> > > refactoring of getmail to not just support but require a recent Python 3.x
> > > version.  Such a project would give me the opportunity to remove a lot of
> > > historical cruft and backwards-compatibility code that getmail has 
> > > accumulated
> > > over 20+ years.
> >
> > That's great.  (I thought you rejected idea to move to 3.0.)
> >
> > I tried to do it around getmail 5.5 days.  (I didn't finish it)
> 
> 
> FYI: I found this repo
> https://gitlab.com/dkg/getmail/commits/python3
> I think this is better work than my local work.

Hi Osamu,
given that a Py3-compatible version is now available as src:getmail6,
let's go ahead and remove getmail?

Cheers,
Moritz



Re: FYI: Python 3 migration of distributuion

2019-11-23 Thread 황병희
> 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...).

Cheer up everyone^^^

Sincerely, Byung-Hee (Getmail user in Ubuntu 18.04)

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//



Re: FYI: Python 3 migration of distributuion

2019-11-19 Thread Michael Kesper
Hi Osamu,

On 19.11.19 14:43, Osamu Aoki wrote:
> FYI: I found this repo
> https://gitlab.com/dkg/getmail/commits/python3
> I think this is better work than my local work.

I like he's done a commit for each step instead of one big
"Turn into Python3" commit.

Best
Michael




signature.asc
Description: OpenPGP digital signature


Re: FYI: Python 3 migration of distributuion

2019-11-19 Thread Osamu Aoki
On Sun, Nov 17, 2019 at 02:28:44PM +0900, Osamu Aoki wrote:
> Hi,
>
> On Wed, Nov 13, 2019 at 11:11:43AM -0600, Charles Cazabon wrote:
> > Osamu Aoki  wrote:
> > >
> > > Currently, getmail is a candidate for removal from the upcoming Debian
> > > release if it is not updated to support python 3 by someone (not
> > > necessary by upstream).
> >
> > Thanks for the update, Osamu.  I have actually been playing with a prototype
> > refactoring of getmail to not just support but require a recent Python 3.x
> > version.  Such a project would give me the opportunity to remove a lot of
> > historical cruft and backwards-compatibility code that getmail has 
> > accumulated
> > over 20+ years.
>
> That's great.  (I thought you rejected idea to move to 3.0.)
>
> I tried to do it around getmail 5.5 days.  (I didn't finish it)


FYI: I found this repo
https://gitlab.com/dkg/getmail/commits/python3
I think this is better work than my local work.

Osamu



Re: FYI: Python 3 migration of distributuion

2019-11-16 Thread Osamu Aoki
Hi,

On Wed, Nov 13, 2019 at 11:11:43AM -0600, Charles Cazabon wrote:
> Osamu Aoki  wrote:
> >
> > Currently, getmail is a candidate for removal from the upcoming Debian
> > release if it is not updated to support python 3 by someone (not
> > necessary by upstream).
>
> Thanks for the update, Osamu.  I have actually been playing with a prototype
> refactoring of getmail to not just support but require a recent Python 3.x
> version.  Such a project would give me the opportunity to remove a lot of
> historical cruft and backwards-compatibility code that getmail has accumulated
> over 20+ years.

That's great.  (I thought you rejected idea to move to 3.0.)

I tried to do it around getmail 5.5 days.  (I didn't finish it)

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

I understand.  When I tried to convert this to Python3, the first thing
I did was clean out all backward compatibility codes, too.  It is too
much work to keep them.

Also if it is Python3 only, we don't need to add things like:

from __future__ import division
 from future import standard_library

If you have a public git repository, maybe some Debian developer may
help you.  If you want, I can set up one at salsa.debian.org (or
github.com) where ever you are comfortable.

At least, if we have a place to share work in progress, we don't
duplicate efforts.


Osamu



Re: FYI: Python 3 migration of distributuion

2019-11-13 Thread Thomas Goirand
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)



Re: FYI: Python 3 migration of distributuion

2019-11-13 Thread Charles Cazabon
Osamu Aoki  wrote:
> 
> Currently, getmail is a candidate for removal from the upcoming Debian
> release if it is not updated to support python 3 by someone (not
> necessary by upstream).

Thanks for the update, Osamu.  I have actually been playing with a prototype
refactoring of getmail to not just support but require a recent Python 3.x
version.  Such a project would give me the opportunity to remove a lot of
historical cruft and backwards-compatibility code that getmail has accumulated
over 20+ years.

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
-- 
---
Charles Cazabon
GPL'ed software available at:   http://pyropus.ca/software/
---