Simplify the get_flag() conditionals in pep425tags.py's get_abi_tag().
@@ -115,18 +115,12 @@ def get_abi_tag():
lambda: hasattr(sys, 'gettotalrefcount'),
warn=(impl == 'cp')):
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: impl == 'cp', warn=(impl == 'cp')):
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=(impl == 'cp')):
u = 'u'
abi = '%s%s%s%s%s' % (impl, get_impl_ver(), d, m, u)
elif soabi and soabi.startswith('cpython-'):
