Patchwork [1,of,2] cleanup: remove compatibility code for Python < 2.7.1

login
register
mail settings
Submitter Manuel Jacob
Date May 29, 2020, 1:56 a.m.
Message ID <6c86927b3d35a364fdfb.1590717383@tmp>
Download mbox | patch
Permalink /patch/46387/
State Accepted
Headers show

Comments

Manuel Jacob - May 29, 2020, 1:56 a.m.
# HG changeset patch
# User Manuel Jacob <me@manueljacob.de>
# Date 1590716588 -7200
#      Fri May 29 03:43:08 2020 +0200
# Node ID 6c86927b3d35a364fdfba9a2e45bea64d1ba7cf6
# Parent  5d77f571a56371a8dd2ae309437985e8751d152b
# EXP-Topic minimum-python-2.7.4-cleanup
cleanup: remove compatibility code for Python < 2.7.1

The minimum supported Python version was recently raised to 2.7.4.
Yuya Nishihara - May 29, 2020, 10:17 a.m.
On Fri, 29 May 2020 03:56:23 +0200, Manuel Jacob wrote:
> # HG changeset patch
> # User Manuel Jacob <me@manueljacob.de>
> # Date 1590716588 -7200
> #      Fri May 29 03:43:08 2020 +0200
> # Node ID 6c86927b3d35a364fdfba9a2e45bea64d1ba7cf6
> # Parent  5d77f571a56371a8dd2ae309437985e8751d152b
> # EXP-Topic minimum-python-2.7.4-cleanup
> cleanup: remove compatibility code for Python < 2.7.1

Queued for default, thanks.

Patch

diff --git a/mercurial/windows.py b/mercurial/windows.py
--- a/mercurial/windows.py
+++ b/mercurial/windows.py
@@ -476,9 +476,6 @@  def shellsplit(s):
 
 def quotecommand(cmd):
     """Build a command string suitable for os.popen* calls."""
-    if sys.version_info < (2, 7, 1):
-        # Python versions since 2.7.1 do this extra quoting themselves
-        return b'"' + cmd + b'"'
     return cmd