Patchwork setup: drop support for Python 2.6 (BC)

login
register
mail settings
Submitter Gregory Szorc
Date May 2, 2017, 11:29 p.m.
Message ID <652bb470b466af0ea655.1493767799@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/20360/
State Accepted
Headers show

Comments

Gregory Szorc - May 2, 2017, 11:29 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1493767144 25200
#      Tue May 02 16:19:04 2017 -0700
# Node ID 652bb470b466af0ea655dd5896b1931b7a6920ed
# Parent  6cacc271ee0a9385be483314dc73be176a13c891
setup: drop support for Python 2.6 (BC)

Per discussion on the mailing list and elsewhere, we've decided that
Python 2.6 is too old to continue supporting. We keep accumulating
hacks/fixes/workarounds for 2.6 and this is taking time away from
more important work.

So with this patch, we officially drop support for Python 2.6 and
require Python 2.7 to run Mercurial.
Yuya Nishihara - May 3, 2017, 8:02 a.m.
On Tue, 02 May 2017 16:29:59 -0700, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc@gmail.com>
> # Date 1493767144 25200
> #      Tue May 02 16:19:04 2017 -0700
> # Node ID 652bb470b466af0ea655dd5896b1931b7a6920ed
> # Parent  6cacc271ee0a9385be483314dc73be176a13c891
> setup: drop support for Python 2.6 (BC)

+1

CC: Kevin as queueing this would break Python 2.6 buildbot.
Augie Fackler - May 3, 2017, 2:27 p.m.
> On May 3, 2017, at 04:02, Yuya Nishihara <yuya@tcha.org> wrote:
> 
> On Tue, 02 May 2017 16:29:59 -0700, Gregory Szorc wrote:
>> # HG changeset patch
>> # User Gregory Szorc <gregory.szorc@gmail.com>
>> # Date 1493767144 25200
>> #      Tue May 02 16:19:04 2017 -0700
>> # Node ID 652bb470b466af0ea655dd5896b1931b7a6920ed
>> # Parent  6cacc271ee0a9385be483314dc73be176a13c891
>> setup: drop support for Python 2.6 (BC)
> 
> +1
> 
> CC: Kevin as queueing this would break Python 2.6 buildbot.

+1

(but note that I queued a patch from Alex Gaynor via IRC this morning that probably introduces slight conflicts)

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/contrib/debian/control b/contrib/debian/control
--- a/contrib/debian/control
+++ b/contrib/debian/control
@@ -12,7 +12,7 @@  Build-Depends:
  unzip,
  zip
 Standards-Version: 3.9.4
-X-Python-Version: >= 2.6
+X-Python-Version: >= 2.7
 
 Package: mercurial
 Depends:
diff --git a/contrib/mercurial.spec b/contrib/mercurial.spec
--- a/contrib/mercurial.spec
+++ b/contrib/mercurial.spec
@@ -37,8 +37,8 @@  BuildRequires: make, gcc, gettext
 %if "%{?withpython}"
 BuildRequires: readline-devel, openssl-devel, ncurses-devel, zlib-devel, bzip2-devel
 %else
-BuildRequires: python >= 2.6, python-devel, python-docutils >= 0.5
-Requires: python >= 2.6
+BuildRequires: python >= 2.7, python-devel, python-docutils >= 0.5
+Requires: python >= 2.7
 %endif
 # The hgk extension uses the wish tcl interpreter, but we don't enforce it
 #Requires: tk
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -5,8 +5,8 @@ 
 # 'python setup.py --help' for more options
 
 import sys, platform
-if getattr(sys, 'version_info', (0, 0, 0)) < (2, 6, 0, 'final'):
-    raise SystemExit("Mercurial requires Python 2.6 or later.")
+if getattr(sys, 'version_info', (0, 0, 0)) < (2, 7, 0, 'final'):
+    raise SystemExit("Mercurial requires Python 2.7 or later.")
 
 if sys.version_info[0] >= 3:
     printf = eval('print')