Skip to content

Commit

Permalink
Merge pull request #6874 from rdb/patch-1
Browse files Browse the repository at this point in the history
Don't append "m" ABI flag in Python 3.8
  • Loading branch information
pfmoore authored Aug 17, 2019
2 parents d6a2ce4 + 48109b1 commit 54eedbd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/6885.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix 'm' flag erroneously being appended to ABI tag in Python 3.8 on platforms that do not provide SOABI
4 changes: 3 additions & 1 deletion src/pip/_internal/pep425tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,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,
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/test_pep425tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 54eedbd

Please sign in to comment.