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

Handle wheels whose RECORD file doesn't match #100

Open
frostming opened this issue Jan 26, 2022 · 1 comment
Open

Handle wheels whose RECORD file doesn't match #100

frostming opened this issue Jan 26, 2022 · 1 comment
Labels
component: core Related to core installation logic component: sources Related to WheelSource and friends type: task Something that needs to be done that is not a bug or feature

Comments

@frostming
Copy link
Contributor

frostming commented Jan 26, 2022

I understand it is the packagers' fault that released a wheel with a mismatching RECORD file. But since pip isn't that strict, people will keep complaining "I can't install xxx but pip works fine." At least installer could provide an option to skip the RECORD validation.

Some examples:

  • selenium==4.1.0
  • catboost==1.0.4

The errors are like:

File "C:\Users\user\AppData\Roaming\pdm\venv\lib\site-packages\pdm\installers\installers.py", line 280, in _install_wheel
  File "C:\Users\user\AppData\Roaming\pdm\venv\lib\site-packages\installer\sources.py", line 170, in get_contents
    assert record is not None, "In {}, {} is not mentioned in RECORD".format(
AssertionError: In C:\Users\user\AppData\Local\Temp\pip-unpack-a3gqvydj\catboost-1.0.4-cp39-none-win_amd64.whl, catboost/core.py is not mentioned in RECORD
@pradyunsg pradyunsg added the type: task Something that needs to be done that is not a bug or feature label Feb 16, 2022
@pradyunsg
Copy link
Member

pradyunsg commented Feb 16, 2022

Well, of course pip just accepts such wheels. :)

Longer term, I think the right thing to do here is for pip to become strict on this front. That isn't happening over the weekend tho. I think adding a yield_files_missing_in_record arg1 that defaults to False and changes this into fabricating a RecordEntry with no size or hash is a reasonable idea.

Combined with #105, I think this is a reasonable thing to do.

Footnotes

  1. Let's defer bikeshedding on the name please. 😅

@pradyunsg pradyunsg added component: sources Related to WheelSource and friends component: core Related to core installation logic labels Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: core Related to core installation logic component: sources Related to WheelSource and friends type: task Something that needs to be done that is not a bug or feature
Projects
None yet
Development

No branches or pull requests

2 participants