Skip to content

[24.2] pip check flags packages with bad WHEEL metadata #12884

Open
@filbranden

Description

@filbranden

Description

Originally reported here

We ran into issues with this new pip check feature in some packages we push.

First three are on Python 3.10 on Linux

  • catboost-1.1.1.dist-info/WHEEL lists no Tag's:
Wheel-Version: 1.0
Root-Is-Purelib: false
  • xgboost-1.6.1.dist-info/WHEEL has Tag's for cp39-cp39-manylinux_2_17_x86_64 and cp39-cp39-manylinux2014_x86_64, but looking at the list in get_supported() Python 3.10 only lists cp39 with abi3 as the second component, it has cp39-abi3-manylinux_2_17_x86_64 and cp39-abi3-manylinux2014_x86_64 which do not match exactly. Contents of xgboost-1.6.1.dist-info/WHEEL below:
Wheel-Version: 1.0
Generator: bdist_wheel (0.37.1)
Root-Is-Purelib: false
Tag: cp39-cp39-manylinux_2_17_x86_64
Tag: cp39-cp39-manylinux2014_x86_64
  • ninja-1.11.1.1.dist-info/WHEEL has a newline above the Tag's, which makes email.parser used in pip return no Tag's since it's expecting no blank lines between header lines:
Wheel-Version: 1.0
Generator: skbuild 0.17.6
Root-Is-Purelib: false

Tag: py2-none-manylinux1_x86_64
Tag: py2-none-manylinux_2_5_x86_64
Tag: py3-none-manylinux1_x86_64
Tag: py3-none-manylinux_2_5_x86_64
  • We also encountered this issue with the extra blank line on frozendict-2.3.8.dist-info/WHEEL on a Python 3.11 setup:
Wheel-Version: 1.0
Generator: bdist_wheel (0.40.0)
Root-Is-Purelib: true

Tag: py311-none-any

I understand some of these could be blamed on the packages and how they were built, but it's still unfortunate that we'll start getting pip check warnings for these, so I thought I would report my findings here. (Also, it was not very easy to troubleshoot the issue, essentially I had to reproduce the commands in this PR to understand what was really going on, since there was no useful output or debug logging to help understand the breakage.)

Thank you!

Expected behavior

Some suggestions:

  • If tag list is empty, consider that as a "no information available" rather than "this supports no platform"
  • Be more lenient with parsing, in a way that blank lines in the WHEEL file are ignored
  • Consider matching in a way that equivalent platforms (such as cp39-cp39-manylinux_2_17_x86_64 and cp39-abi3-manylinux_2_17_x86_64, assuming these are indeed equivalent) would compare the same

And it would be useful to preserve information that might be useful for debugging, perhaps as a separate debug log (dumping all supported platform information in the output would be too much, for sure.)

Of course this is easier said than done, but I still wanted to be able to try and give constructive suggestions here.

pip version

24.2

Python version

3.10

OS

Linux (Debian Bullseye)

How to Reproduce

Run pip check including the packages mentioned above

Output

catboost 1.1.1 is not supported on this platform
ninja 1.11.1.1 is not supported on this platform
xgboost 1.6.1 is not supported on this platform
frozendict 2.3.8 is not supported on this platform

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: checkChecking dependency graph for consistencytype: enhancementImprovements to functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions