Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging.tags does not include m for abi tag in Python 3.7 (and below) #181

Closed
chrahunt opened this issue Aug 16, 2019 · 2 comments · Fixed by #185
Closed

packaging.tags does not include m for abi tag in Python 3.7 (and below) #181

chrahunt opened this issue Aug 16, 2019 · 2 comments · Fixed by #185
Assignees
Labels

Comments

@chrahunt
Copy link
Member

@chrahunt chrahunt commented Aug 16, 2019

Environment

OS: Windows 10
Packaging version: 19.1
Python version: Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)], from nuget

Issue: The ABI tag for Python 3.7 in sys_tags() does not have cp37m (just cp37):

(.venv) PS C:\Users\User\Desktop> python -c 'from packaging.tags import sys_tags; print(list(sys_tags()))'
[<cp37-cp37-win_amd64 @ 2675185733256>, <cp37-abi3-win_amd64 @ 2675185848584>, <cp37-none-win_amd64 @ 2675185852360>, <cp36-abi3-win_amd64 @ 2675185868424>, <cp35-abi3-win_amd64 @ 2675185868488>, <cp34-abi3-win_amd64 @ 2675188128520>, <cp33-abi3-win_amd64 @ 2675188128776>, <cp32-abi3-win_amd64 @ 2675188129032>, <py37-none-win_amd64 @ 2675188129544>, <py3-none-win_amd64 @ 2675188154440>, <py36-none-win_amd64 @ 2675188154696>, <py35-none-win_amd64 @ 2675188154952>, <py34-none-win_amd64 @ 2675188155208>, <py33-none-win_amd64 @ 2675188155464>, <py32-none-win_amd64 @ 2675188155720>, <py31-none-win_amd64 @ 2675188155976>, <py30-none-win_amd64 @ 2675188156232>, <cp37-none-any @ 2675188129288>, <py37-none-any @ 2675185733576>, <py3-none-any @ 2675188156680>, <py36-none-any @ 2675188156936>, <py35-none-any @ 2675188157192>, <py34-none-any @ 2675188157448>, <py33-none-any @ 2675188157704>, <py32-none-any @ 2675188157960>, <py31-none-any @ 2675188158216>, <py30-none-any @ 2675188162632>]

Expected: The ABI tag for Python 3.7 should have cp37m.

It looks like we are relying strictly on either SOABI or WITH_PYMALLOC being available here, but neither are:

(.venv) PS C:\Users\User\Desktop> python -c "from sysconfig import get_config_var as c; print(c('SOABI')); print(c('WITH_PYMALLOC'))"
None
None

Related to #180.

@brettcannon
Copy link
Member

@brettcannon brettcannon commented Aug 20, 2019

The culprit is the comment:

# TODO: This code is simpler compared to pep425tags as CPython 2.7 didn't seem

where I mention that I left out the fallback semantics as I couldn't find a place where they were influencing results. Looks like they were still being used. 😁

Probably need to go back through https://github.com/pypa/pip/blob/0b23e2d68a7de096b75fe3ad290acd7239b6f8fa/src/pip/_internal/pep425tags.py#L110-L125 and use the fallbacks.

@brettcannon
Copy link
Member

@brettcannon brettcannon commented Aug 20, 2019

Comparing the tags that are produced by pip 19.2.2 and packaging.tags 19.1 on Windows 10, the ones pip has which packaging doesn't are:

  1. cp3-none-any
  2. cp37-cp37m-win_amd64

Under Debian on WSL:

  1. cp3-none-any

So that cp37m case on Windows is the one issue (the cp3-non-any has been purposefully left out as it doesn't make sense).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants