Merge pull request #6874 from rdb/patch-1

Don't append "m" ABI flag in Python 3.8
This commit is contained in:
Paul Moore 2019-08-17 09:47:46 +01:00 committed by Pradyun Gedam
parent 082bc0411e
commit f07d7618fb
No known key found for this signature in database
GPG Key ID: DA17C4B29CB32E4B
3 changed files with 8 additions and 1 deletions

1
news/6885.bugfix Normal file
View File

@ -0,0 +1 @@
Fix 'm' flag erroneously being appended to ABI tag in Python 3.8 on platforms that do not provide SOABI

View File

@ -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,

View File

@ -47,6 +47,10 @@ class TestPEP425Tags(object):
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)