Skip to content

Improve handling of wheels with invalid versions #10945

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

Closed
wants to merge 4 commits into from

Conversation

pradyunsg
Copy link
Member

Closes #9188

@pradyunsg pradyunsg added type: enhancement Improvements to functionality C: error messages Improving error messages labels Mar 7, 2022
@pradyunsg pradyunsg changed the title Raise a better-looking error when a wheel has an invalid version Improve handling of wheels with invalid versions Mar 10, 2022
@pradyunsg pradyunsg force-pushed the better-invalid-version branch from bfab215 to f58de94 Compare March 10, 2022 09:04
@pradyunsg
Copy link
Member Author

I'm not too keen on adding extensive tests here, but feel free to ask for more if you'd like them! :)

@pradyunsg pradyunsg force-pushed the better-invalid-version branch from f58de94 to 49b8a2b Compare April 8, 2022 13:25
Instead of immediately turning the behaviour into a failure, this
deprecates all the invalid wheel combinations; presenting a deprecation
warning with a deadline.

These conditionals can later be simplified to remove the `is_file`
checks and only have the assertions/errors, dropping all the branches
that call `deprecated`.
@pradyunsg pradyunsg force-pushed the better-invalid-version branch from 49b8a2b to e542847 Compare April 8, 2022 13:27
Comment on lines +282 to +285
f"Got an name mismatch in wheel ({name} != {wheel_name}) "
f"for {wheel.filename}, which is not permitted "
"as per the wheel specification."
),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also mention which one pip is going to use.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have name in there, along with wheel's name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but we don’t say which one of them we’re going to use as the package’s name in later parts of the installation.

@github-actions github-actions bot added the needs rebase or merge PR has conflicts with current master label Jun 1, 2022
@pradyunsg
Copy link
Member Author

Closing this for now, we can revisit this later.

@pradyunsg pradyunsg closed this Sep 30, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: error messages Improving error messages needs rebase or merge PR has conflicts with current master type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error message for wheels with non-compliant versions
2 participants