Patchwork [stable] setup: raise minimum Python version to 2.7.4

login
register
mail settings
Submitter Manuel Jacob
Date May 23, 2020, 7:26 p.m.
Message ID <f1178237058e45f30c34.1590261999@tmp.fritz.box>
Download mbox | patch
Permalink /patch/46369/
State Accepted
Headers show

Comments

Manuel Jacob - May 23, 2020, 7:26 p.m.
# HG changeset patch
# User Manuel Jacob <me@manueljacob.de>
# Date 1589496817 -7200
#      Fri May 15 00:53:37 2020 +0200
# Branch stable
# Node ID f1178237058e45f30c3418b7a6c1e9341d3e3e60
# Parent  edffab2cf0ead5140fdaa391c1c827ddc53dfe35
# EXP-Topic minimum-python-2.7.4
setup: raise minimum Python version to 2.7.4

On older Python versions, Mercurial is not really usable because of
https://bugs.python.org/issue10211.

Recently someone reported a crash on the mailing list when running Mercurial
on Python 2.7.3. There was consensus that fixing compatibility for a Python
version more than 7 years old is not worth it. So, instead of making Mercurial
crash with an obscure exception, this patch raises the minimum Python version
to 2.7.4.
Yuya Nishihara - May 24, 2020, 11:30 a.m.
On Sat, 23 May 2020 21:26:39 +0200, Manuel Jacob wrote:
> # HG changeset patch
> # User Manuel Jacob <me@manueljacob.de>
> # Date 1589496817 -7200
> #      Fri May 15 00:53:37 2020 +0200
> # Branch stable
> # Node ID f1178237058e45f30c3418b7a6c1e9341d3e3e60
> # Parent  edffab2cf0ead5140fdaa391c1c827ddc53dfe35
> # EXP-Topic minimum-python-2.7.4
> setup: raise minimum Python version to 2.7.4

Queued for stable, thanks.

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@  import os
 # bug link: https://bugs.python.org/issue25270
 supportedpy = ','.join(
     [
-        '>=2.7',
+        '>=2.7.4',
         '!=3.0.*',
         '!=3.1.*',
         '!=3.2.*',
@@ -54,7 +54,7 @@  else:
 # should have a chance of getting a 4.2 release, and when we ratchet
 # the version requirement forward again hopefully everyone will get
 # something that works for them.
-if sys.version_info < (2, 7, 0, 'final'):
+if sys.version_info < (2, 7, 4, 'final'):
     pip_message = (
         'This may be due to an out of date pip. '
         'Make sure you have pip >= 9.0.1.'
@@ -74,7 +74,7 @@  if sys.version_info < (2, 7, 0, 'final')
     except Exception:
         pass
     error = """
-Mercurial does not support Python older than 2.7.
+Mercurial does not support Python older than 2.7.4.
 Python {py} detected.
 {pip}
 """.format(