Pip allows cpxx-none-any tags (and maybe it shouldn't)
See original GitHub issueDescription
Continuing discussion from: https://github.com/pypa/packaging/issues/511
In summary, pip’s TargetPython.get_tags()
for cpython includes eg cp39-none-any as one of the compatible flags. This is because it always passes the interpreter in when it calls packaging.tags.compatible_tags()
. This is inconsistent with packaging.tags.sys_tags()
, which doesn’t pass the interepeter in unless it’s pypy. packaging.tags.sys_tags()
therefore doesn’t include cp39-none-any.
One practical implication of this is that the pyxll distribution, which has only cpxx-none-any wheels, installs with pip but doesn’t with poetry
, which uses packaging.tags.sys_tags()
.
Discussion of this on the packaging issue above suggests this should be considered an issue with pip, and that it shouldn’t include these tags. However, please note that this behaviour wasn’t introduced recently and it is relied on by, at least, pyxll. Pip versions as old as 20.2 are able to install the pyxll wheels.
Expected behavior
I would expect pip and packaging.tags to agree on which tags are compatible with a given python installation.
pip version
22.0.3
Python version
3.9
OS
Windows
How to Reproduce
- pip install pyxll
- It works, and arguably shouldn’t.
Output
No response
Code of Conduct
- I agree to follow the PSF Code of Conduct.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (11 by maintainers)
Top GitHub Comments
In terms of this issue specifically, personally I don’t think pip should disallow this particular tag, mostly with a “why not” reasoning. It’s not inconceivable to come up with scenarios (albeit contrived) that the tag may make sense to someone.
The next release of
packaging
will include the tag: https://github.com/pypa/packaging/issues/511 .