Patchwork [2,of,2,DROP-PYTHON-2.4] setup.py: drop compatibility with Python 2.4 and 2.5

login
register
mail settings
Submitter Pierre-Yves David
Date May 9, 2015, 6:54 a.m.
Message ID <86d3dce8979a3c2f9b82.1431154495@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/8994/
State Accepted
Delegated to: Matt Mackall
Headers show

Comments

Pierre-Yves David - May 9, 2015, 6:54 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1431153855 25200
#      Fri May 08 23:44:15 2015 -0700
# Node ID 86d3dce8979a3c2f9b826ed7981d4ffe2f9444f5
# Parent  16b07284fef670b26815b6533b742b21f40fedb1
setup.py: drop compatibility with Python 2.4 and 2.5

The last blocker for dropping Python 2.4 was Centos 5. We now provide our own
Mercurial package for Centos 5 with a bundled Python2.7.

I'm therefore happy to officially drop compatibility with Python 2.4 (and
Python 2.5 that nobody really cares about). This open the season for code
cleanup.

It is war's prize to take all vantage.
Sean Farley - May 9, 2015, 7:04 a.m.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> writes:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1431153855 25200
> #      Fri May 08 23:44:15 2015 -0700
> # Node ID 86d3dce8979a3c2f9b826ed7981d4ffe2f9444f5
> # Parent  16b07284fef670b26815b6533b742b21f40fedb1
> setup.py: drop compatibility with Python 2.4 and 2.5
>
> The last blocker for dropping Python 2.4 was Centos 5. We now provide our own
> Mercurial package for Centos 5 with a bundled Python2.7.
>
> I'm therefore happy to officially drop compatibility with Python 2.4 (and
> Python 2.5 that nobody really cares about). This open the season for code
> cleanup.
>
> It is war's prize to take all vantage.

Cry 'Havoc!', and let slip the dogs of war!
Pierre-Yves David - May 9, 2015, 7:13 a.m.
On 05/08/2015 11:54 PM, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1431153855 25200
> #      Fri May 08 23:44:15 2015 -0700
> # Node ID 86d3dce8979a3c2f9b826ed7981d4ffe2f9444f5
> # Parent  16b07284fef670b26815b6533b742b21f40fedb1
> setup.py: drop compatibility with Python 2.4 and 2.5
>
> The last blocker for dropping Python 2.4 was Centos 5. We now provide our own
> Mercurial package for Centos 5 with a bundled Python2.7.

We have Centos 5 package build automatically for each tagged version.

We have them available online:
   http://mercurial.selenic.com/release/centos5/

We have installation instructions:
   http://mercurial.selenic.com/wiki/Download#Linux_.28.rpm.29

We (ok I) gave up on a .dat entry because I cannot get a UserAgent regex 
that match Centos5 and I do not see the point to link to individual 
package when we have repository

We still need to setup some serious signing scheme for our packages/repo 
but I believe we can come-up with something by the release candidate. 
(in 2 months)

So let's move forward and kill the beast!
Matt Mackall - May 12, 2015, 9:13 p.m.
On Fri, 2015-05-08 at 23:54 -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1431153855 25200
> #      Fri May 08 23:44:15 2015 -0700
> # Node ID 86d3dce8979a3c2f9b826ed7981d4ffe2f9444f5
> # Parent  16b07284fef670b26815b6533b742b21f40fedb1
> setup.py: drop compatibility with Python 2.4 and 2.5

These are queued for default, thanks.
Augie Fackler - May 12, 2015, 10:09 p.m.
On Tue, May 12, 2015 at 04:13:37PM -0500, Matt Mackall wrote:
> On Fri, 2015-05-08 at 23:54 -0700, Pierre-Yves David wrote:
> > # HG changeset patch
> > # User Pierre-Yves David <pierre-yves.david@fb.com>
> > # Date 1431153855 25200
> > #      Fri May 08 23:44:15 2015 -0700
> > # Node ID 86d3dce8979a3c2f9b826ed7981d4ffe2f9444f5
> > # Parent  16b07284fef670b26815b6533b742b21f40fedb1
> > setup.py: drop compatibility with Python 2.4 and 2.5
>
> These are queued for default, thanks.

Best news of 2015 so far. Thanks!

>
> --
> Mathematics is the supreme nostalgia of our time.
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -3,12 +3,12 @@ 
 #
 # 'python setup.py install', or
 # 'python setup.py --help' for more options
 
 import sys, platform
-if getattr(sys, 'version_info', (0, 0, 0)) < (2, 4, 0, 'final'):
-    raise SystemExit("Mercurial requires Python 2.4 or later.")
+if getattr(sys, 'version_info', (0, 0, 0)) < (2, 6, 0, 'final'):
+    raise SystemExit("Mercurial requires Python 2.6 or later.")
 
 if sys.version_info[0] >= 3:
     def b(s):
         '''A helper function to emulate 2.6+ bytes literals using string
         literals.'''