From f07d7618fb64a53c9bc09f53bc29a8a2acdba9d0 Mon Sep 17 00:00:00 2001
From: Paul Moore
Date: Sat, 17 Aug 2019 09:47:46 +0100
Subject: [PATCH 1/5] Merge pull request #6874 from rdb/patch-1
Don't append "m" ABI flag in Python 3.8
---
news/6885.bugfix | 1 +
src/pip/_internal/pep425tags.py | 4 +++-
tests/unit/test_pep425tags.py | 4 ++++
3 files changed, 8 insertions(+), 1 deletion(-)
create mode 100644 news/6885.bugfix
diff --git a/news/6885.bugfix b/news/6885.bugfix
new file mode 100644
index 00000000000..1eedfec9376
--- /dev/null
+++ b/news/6885.bugfix
@@ -0,0 +1 @@
+Fix 'm' flag erroneously being appended to ABI tag in Python 3.8 on platforms that do not provide SOABI
diff --git a/src/pip/_internal/pep425tags.py b/src/pip/_internal/pep425tags.py
index 07dc148eec3..3efe025fffa 100644
--- a/src/pip/_internal/pep425tags.py
+++ b/src/pip/_internal/pep425tags.py
@@ -115,7 +115,9 @@ def get_abi_tag():
d = 'd'
if get_flag('WITH_PYMALLOC',
lambda: impl == 'cp',
- warn=(impl == 'cp')):
+ warn=(impl == 'cp' and
+ sys.version_info < (3, 8))) \
+ and sys.version_info < (3, 8):
m = 'm'
if get_flag('Py_UNICODE_SIZE',
lambda: sys.maxunicode == 0x10ffff,
diff --git a/tests/unit/test_pep425tags.py b/tests/unit/test_pep425tags.py
index f570de62133..a18f525a98f 100644
--- a/tests/unit/test_pep425tags.py
+++ b/tests/unit/test_pep425tags.py
@@ -47,6 +47,10 @@ def abi_tag_unicode(self, flags, config_vars):
base = pip._internal.pep425tags.get_abbr_impl() + \
pip._internal.pep425tags.get_impl_ver()
+ if sys.version_info >= (3, 8):
+ # Python 3.8 removes the m flag, so don't look for it.
+ flags = flags.replace('m', '')
+
if sys.version_info < (3, 3):
config_vars.update({'Py_UNICODE_SIZE': 2})
mock_gcf = self.mock_get_config_var(**config_vars)
From 2282e97a027d3b1e2bbf5537f34bc23b8dbf2efe Mon Sep 17 00:00:00 2001
From: Chris Jerdonek
Date: Sat, 17 Aug 2019 17:49:20 -0700
Subject: [PATCH 2/5] Merge pull request #6889 from
cjerdonek/simplify-get-abi-tag-conditionals
Simplify get_flag() conditionals in get_abi_tag() [pep425tags]
---
src/pip/_internal/pep425tags.py | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/src/pip/_internal/pep425tags.py b/src/pip/_internal/pep425tags.py
index 3efe025fffa..c6e58bf3aae 100644
--- a/src/pip/_internal/pep425tags.py
+++ b/src/pip/_internal/pep425tags.py
@@ -109,22 +109,17 @@ def get_abi_tag():
d = ''
m = ''
u = ''
- if get_flag('Py_DEBUG',
- lambda: hasattr(sys, 'gettotalrefcount'),
- warn=(impl == 'cp')):
+ is_cpython = (impl == 'cp')
+ if get_flag(
+ 'Py_DEBUG', lambda: hasattr(sys, 'gettotalrefcount'),
+ warn=is_cpython):
d = 'd'
- if get_flag('WITH_PYMALLOC',
- lambda: impl == 'cp',
- warn=(impl == 'cp' and
- sys.version_info < (3, 8))) \
- and sys.version_info < (3, 8):
+ if sys.version_info < (3, 8) and get_flag(
+ 'WITH_PYMALLOC', lambda: is_cpython, warn=is_cpython):
m = 'm'
- if get_flag('Py_UNICODE_SIZE',
- lambda: sys.maxunicode == 0x10ffff,
- expected=4,
- warn=(impl == 'cp' and
- sys.version_info < (3, 3))) \
- and sys.version_info < (3, 3):
+ if sys.version_info < (3, 3) and get_flag(
+ 'Py_UNICODE_SIZE', lambda: sys.maxunicode == 0x10ffff,
+ expected=4, warn=is_cpython):
u = 'u'
abi = '%s%s%s%s%s' % (impl, get_impl_ver(), d, m, u)
elif soabi and soabi.startswith('cpython-'):
From 51c8ec02bb02a59023548b17bba1d38fc11c9dc4 Mon Sep 17 00:00:00 2001
From: Pradyun Gedam
Date: Sun, 25 Aug 2019 09:46:53 +0530
Subject: [PATCH 3/5] Bump version for release
---
src/pip/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pip/__init__.py b/src/pip/__init__.py
index 04304fd573e..0803e00112a 100644
--- a/src/pip/__init__.py
+++ b/src/pip/__init__.py
@@ -1 +1 @@
-__version__ = "19.2.2"
+__version__ = "19.2.3"
From a5b1a57d6707ca9a8ea28c3c1d96b266ed88fbcb Mon Sep 17 00:00:00 2001
From: Pradyun Gedam
Date: Sun, 25 Aug 2019 09:47:04 +0530
Subject: [PATCH 4/5] Generate NEWS
---
NEWS.rst | 9 +++++++++
news/6885.bugfix | 1 -
2 files changed, 9 insertions(+), 1 deletion(-)
delete mode 100644 news/6885.bugfix
diff --git a/NEWS.rst b/NEWS.rst
index 7e68de9e82d..e1c47d88c01 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -7,6 +7,15 @@
.. towncrier release notes start
+19.2.3 (2019-08-25)
+===================
+
+Bug Fixes
+---------
+
+- Fix 'm' flag erroneously being appended to ABI tag in Python 3.8 on platforms that do not provide SOABI (`#6885 `_)
+
+
19.2.2 (2019-08-11)
===================
diff --git a/news/6885.bugfix b/news/6885.bugfix
deleted file mode 100644
index 1eedfec9376..00000000000
--- a/news/6885.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix 'm' flag erroneously being appended to ABI tag in Python 3.8 on platforms that do not provide SOABI
From 4b99a2f161cac266e84f0d2579e1d14696b79593 Mon Sep 17 00:00:00 2001
From: Pradyun Gedam
Date: Sun, 25 Aug 2019 10:00:06 +0530
Subject: [PATCH 5/5] Bump for development
---
src/pip/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pip/__init__.py b/src/pip/__init__.py
index 0803e00112a..9c2e2a3bb48 100644
--- a/src/pip/__init__.py
+++ b/src/pip/__init__.py
@@ -1 +1 @@
-__version__ = "19.2.3"
+__version__ = "19.3.dev0"