Patchwork [hglib] Drop support for python 2.4 and 2.5, as is core hg

login
register
mail settings
Submitter Axel Hecht
Date April 6, 2016, 12:36 p.m.
Message ID <674bd25c2339aa4b2be7.1459946184@fuchsia.local>
Download mbox | patch
Permalink /patch/14390/
State Rejected
Headers show

Comments

Axel Hecht - April 6, 2016, 12:36 p.m.
# HG changeset patch
# User Axel Hecht <axel@pike.org>
# Date 1442329051 -7200
#      Tue Sep 15 16:57:31 2015 +0200
# Node ID 674bd25c2339aa4b2be714b8d763c93c8eb07b36
# Parent  8c4d24b58c23030616d7f65a4ae3a392e8ef9d0d
Drop support for python 2.4 and 2.5, as is core hg.

See https://selenic.com/repo/hg/rev/e1fb276d4619 for context.
Matt Mackall - April 6, 2016, 1:25 p.m.
On Wed, 2016-04-06 at 14:36 +0200, Axel Hecht wrote:
> # HG changeset patch
> # User Axel Hecht <axel@pike.org>
> # Date 1442329051 -7200
> #      Tue Sep 15 16:57:31 2015 +0200
> # Node ID 674bd25c2339aa4b2be714b8d763c93c8eb07b36
> # Parent  8c4d24b58c23030616d7f65a4ae3a392e8ef9d0d
> Drop support for python 2.4 and 2.5, as is core hg.

The maintenance burden for 2.4 support in hglib is currently zero, so I don't
see a reason to do this. If, for some crazy reason, someone has a Python2.4-
based hglib app that they don't want to update, they needn't run it against a
Python2.4-compatible hg. Since basically every 2.x release required fixes in
Mercurial itself, this isn't a particularly unlikely scenario[1].

On the other hand, if you're planning substantial work on hglib that depends on
2.6 features, I'm happy to listen.

[1] Compare that to the Perl-based db-backed fulltext search engine I have
running on my mail server that's been running unattended for about 18 years.
-- 
Mathematics is the supreme nostalgia of our time.
Axel Hecht - April 6, 2016, 1:34 p.m.
On 06/04/16 15:25, Matt Mackall wrote:
> On Wed, 2016-04-06 at 14:36 +0200, Axel Hecht wrote:
>> # HG changeset patch
>> # User Axel Hecht <axel@pike.org>
>> # Date 1442329051 -7200
>> #      Tue Sep 15 16:57:31 2015 +0200
>> # Node ID 674bd25c2339aa4b2be714b8d763c93c8eb07b36
>> # Parent  8c4d24b58c23030616d7f65a4ae3a392e8ef9d0d
>> Drop support for python 2.4 and 2.5, as is core hg.
> The maintenance burden for 2.4 support in hglib is currently zero, so I don't
> see a reason to do this. If, for some crazy reason, someone has a Python2.4-
> based hglib app that they don't want to update, they needn't run it against a
> Python2.4-compatible hg. Since basically every 2.x release required fixes in
> Mercurial itself, this isn't a particularly unlikely scenario[1].
>
> On the other hand, if you're planning substantial work on hglib that depends on
> 2.6 features, I'm happy to listen.
I removed those based on a conversation I had with gps about other 
patches that I'm about to submit after this.
https://bitbucket.org/pike/python-hglib/commits/c82671bcb9c61d96cdaa8116a78dd184c18f5e53#comment-1970588 
was were we discussed this.

In this particular case,

-        return context.changectx(self, changeid)
+        try:
+            return context.changectx(self, changeid)
+        except ValueError as e:
+            raise IndexError(*e.args)

only works this way in non-ancient versions of python.

The other patches are for 
https://bz.mercurial-scm.org/buglist.cgi?bug_id=4510,4511,4644, one 
patch each.

I didn't mass-submit them all 'cause the wiki said so, but I'm happy to 
send them over for context.

Axel

>
> [1] Compare that to the Perl-based db-backed fulltext search engine I have
> running on my mail server that's been running unattended for about 18 years.
> -- 
> Mathematics is the supreme nostalgia of our time.
>
Axel Hecht - April 6, 2016, 1:34 p.m.
On 06/04/16 15:25, Matt Mackall wrote:
> On Wed, 2016-04-06 at 14:36 +0200, Axel Hecht wrote:
>> # HG changeset patch
>> # User Axel Hecht <axel@pike.org>
>> # Date 1442329051 -7200
>> #      Tue Sep 15 16:57:31 2015 +0200
>> # Node ID 674bd25c2339aa4b2be714b8d763c93c8eb07b36
>> # Parent  8c4d24b58c23030616d7f65a4ae3a392e8ef9d0d
>> Drop support for python 2.4 and 2.5, as is core hg.
> The maintenance burden for 2.4 support in hglib is currently zero, so I don't
> see a reason to do this. If, for some crazy reason, someone has a Python2.4-
> based hglib app that they don't want to update, they needn't run it against a
> Python2.4-compatible hg. Since basically every 2.x release required fixes in
> Mercurial itself, this isn't a particularly unlikely scenario[1].
>
> On the other hand, if you're planning substantial work on hglib that depends on
> 2.6 features, I'm happy to listen.
I removed those based on a conversation I had with gps about other 
patches that I'm about to submit after this.
https://bitbucket.org/pike/python-hglib/commits/c82671bcb9c61d96cdaa8116a78dd184c18f5e53#comment-1970588 
was were we discussed this.

In this particular case,

-        return context.changectx(self, changeid)
+        try:
+            return context.changectx(self, changeid)
+        except ValueError as e:
+            raise IndexError(*e.args)

only works this way in non-ancient versions of python.

The other patches are for 
https://bz.mercurial-scm.org/buglist.cgi?bug_id=4510,4511,4644, one 
patch each.

I didn't mass-submit them all 'cause the wiki said so, but I'm happy to 
send them over for context.

Axel

>
> [1] Compare that to the Perl-based db-backed fulltext search engine I have
> running on my mail server that's been running unattended for about 18 years.
> -- 
> Mathematics is the supreme nostalgia of our time.
>
Augie Fackler - April 6, 2016, 1:44 p.m.
On Wed, Apr 06, 2016 at 03:34:30PM +0200, Axel Hecht wrote:
> On 06/04/16 15:25, Matt Mackall wrote:
> >On Wed, 2016-04-06 at 14:36 +0200, Axel Hecht wrote:
> >># HG changeset patch
> >># User Axel Hecht <axel@pike.org>
> >># Date 1442329051 -7200
> >>#      Tue Sep 15 16:57:31 2015 +0200
> >># Node ID 674bd25c2339aa4b2be714b8d763c93c8eb07b36
> >># Parent  8c4d24b58c23030616d7f65a4ae3a392e8ef9d0d
> >>Drop support for python 2.4 and 2.5, as is core hg.
> >The maintenance burden for 2.4 support in hglib is currently zero, so I don't
> >see a reason to do this. If, for some crazy reason, someone has a Python2.4-
> >based hglib app that they don't want to update, they needn't run it against a
> >Python2.4-compatible hg. Since basically every 2.x release required fixes in
> >Mercurial itself, this isn't a particularly unlikely scenario[1].
> >
> >On the other hand, if you're planning substantial work on hglib that depends on
> >2.6 features, I'm happy to listen.
> I removed those based on a conversation I had with gps about other patches
> that I'm about to submit after this.
> https://bitbucket.org/pike/python-hglib/commits/c82671bcb9c61d96cdaa8116a78dd184c18f5e53#comment-1970588
> was were we discussed this.
>
> In this particular case,
>
> -        return context.changectx(self, changeid)
> +        try:
> +            return context.changectx(self, changeid)
> +        except ValueError as e:
> +            raise IndexError(*e.args)
>
> only works this way in non-ancient versions of python.
>
> The other patches are for
> https://bz.mercurial-scm.org/buglist.cgi?bug_id=4510,4511,4644, one patch
> each.
>
> I didn't mass-submit them all 'cause the wiki said so, but I'm happy to send
> them over for context.

If it's 5 or so patches, feel free to send them all out. If it's
mostly the exception syntax, I'm not sure that quite justifies
ditching 2.4 here, but I could be pretty easily persuaded.

>
> Axel
>
> >
> >[1] Compare that to the Perl-based db-backed fulltext search engine I have
> >running on my mail server that's been running unattended for about 18 years.
> >--
> >Mathematics is the supreme nostalgia of our time.
> >
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Gregory Szorc - April 7, 2016, 9:41 p.m.
On Wed, Apr 6, 2016 at 9:44 AM, Augie Fackler <raf@durin42.com> wrote:

> On Wed, Apr 06, 2016 at 03:34:30PM +0200, Axel Hecht wrote:
> > On 06/04/16 15:25, Matt Mackall wrote:
> > >On Wed, 2016-04-06 at 14:36 +0200, Axel Hecht wrote:
> > >># HG changeset patch
> > >># User Axel Hecht <axel@pike.org>
> > >># Date 1442329051 -7200
> > >>#      Tue Sep 15 16:57:31 2015 +0200
> > >># Node ID 674bd25c2339aa4b2be714b8d763c93c8eb07b36
> > >># Parent  8c4d24b58c23030616d7f65a4ae3a392e8ef9d0d
> > >>Drop support for python 2.4 and 2.5, as is core hg.
> > >The maintenance burden for 2.4 support in hglib is currently zero, so I
> don't
> > >see a reason to do this. If, for some crazy reason, someone has a
> Python2.4-
> > >based hglib app that they don't want to update, they needn't run it
> against a
> > >Python2.4-compatible hg. Since basically every 2.x release required
> fixes in
> > >Mercurial itself, this isn't a particularly unlikely scenario[1].
> > >
> > >On the other hand, if you're planning substantial work on hglib that
> depends on
> > >2.6 features, I'm happy to listen.
> > I removed those based on a conversation I had with gps about other
> patches
> > that I'm about to submit after this.
> >
> https://bitbucket.org/pike/python-hglib/commits/c82671bcb9c61d96cdaa8116a78dd184c18f5e53#comment-1970588
> > was were we discussed this.
> >
> > In this particular case,
> >
> > -        return context.changectx(self, changeid)
> > +        try:
> > +            return context.changectx(self, changeid)
> > +        except ValueError as e:
> > +            raise IndexError(*e.args)
> >
> > only works this way in non-ancient versions of python.
> >
> > The other patches are for
> > https://bz.mercurial-scm.org/buglist.cgi?bug_id=4510,4511,4644, one
> patch
> > each.
> >
> > I didn't mass-submit them all 'cause the wiki said so, but I'm happy to
> send
> > them over for context.
>
> If it's 5 or so patches, feel free to send them all out. If it's
> mostly the exception syntax, I'm not sure that quite justifies
> ditching 2.4 here, but I could be pretty easily persuaded.
>
>
We could benefit from context managers in hglib. As it stands today, it is
relatively easy to forget to close the connection, leaving an orphaned
process.

Also, it would be nice to make hglib compatible with Python 3.5, which
won't be possible as long as we support 2.4/2.5.


> >
> > Axel
> >
> > >
> > >[1] Compare that to the Perl-based db-backed fulltext search engine I
> have
> > >running on my mail server that's been running unattended for about 18
> years.
> > >--
> > >Mathematics is the supreme nostalgia of our time.
> > >
> >
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel@mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
Augie Fackler - April 8, 2016, 6:22 p.m.
> On Apr 7, 2016, at 17:41, Gregory Szorc <gregory.szorc@gmail.com> wrote:
> 
> We could benefit from context managers in hglib. As it stands today, it is relatively easy to forget to close the connection, leaving an orphaned process.

Can't we conform to the context manager API without requiring 2.6?

> Also, it would be nice to make hglib compatible with Python 3.5, which won't be possible as long as we support 2.4/2.5.

I thought we already supported 3.5 here thanks to Brett Cannon?

>  
> >
> > Axel
> >
> > >
> > >[1] Compare that to the Perl-based db-backed fulltext search engine I have
> > >running on my mail server that's been running unattended for about 18 years.
> > >--
> > >Mathematics is the supreme nostalgia of our time.
> > >
> >
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel@mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> 
>

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -42,8 +42,6 @@ 
                                        'README')).read(),
     classifiers=[
         'Programming Language :: Python',
-        'Programming Language :: Python :: 2.4',
-        'Programming Language :: Python :: 2.5',
         'Programming Language :: Python :: 2.6',
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',