-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Removal of support for non-standard (PEP 440) wheel filenames #12938
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
Comments
Hello 👋🏼 I'm here as a result of spurious messages like the following in our builds:
Given we have a history of incorrectly named wheels, if we were to fix the naming sometime between now and whenever pip 25.1 drops, what outcomes would we expect to see during package resolution? What outcomes would we expect to see if a package has compliant versions, and someone accidentally publishes a non-compliant version if compliant versions meet the version requirement constraints? |
Hi @testworksau and thanks for reporting.
That's a great question, it should be that invalid file names give a warning, or an error, but the resolution moves on to valid names. It would be a great help if are you able to install pip from this PR and check what the current behavior is? You can install it like so:
The idea is that non-compliant versions should be ignored, but some feedback on a real world scenario would help a lot. Looking at your actual wheel filename, currently the "version" part ends up including this "PullRequest" part and that's not a valid wheel filename:
You can check the wheel filename spec: https://packaging.python.org/en/latest/specifications/binary-distribution-format/#file-format You could add a build tag, but it is only allowed to be a number, so it would look like |
Well, the specification only mandates that build tags start with a digit. So if you'd like, you could include |
Was it ever confirmed that in 25.1, pip will still complain about the invalid filenames, but still be able to install other, correct versions of the same package? |
Yes, pip 25.1 will still be able to install wheels with invalid filenames. The deprication warning was widened to cover any wheel filename that is invalid, and failing to intstall was pushed back to pip 25.3. |
@notatallshaw OK, got it, thank you. If I have some invalid and some valid versions of the same package, will it still be able to install the valid ones? Like you said above, "The idea is that non-compliant versions should be ignored," - is that what will happen? |
Yes, that's the plan, otherwise it would be problematic for indexes that already have many wheels with invalid file names. I will add multiple test cases to cover this. |
That's great, thank you! |
What's the problem this feature will solve?
This issue it to track the the removal of supporting non-standard (PEP 440) wheel filenames.
Describe the solution you'd like
Pip will use packaging as the source of truth for the validity and parsing of wheel filenames
Alternative Solutions
None
Additional context
Previously pip implemented it's own custom logic but now will using the standard
packaging
library, you can check yourself by installingpackaging
and running:Code of Conduct
The text was updated successfully, but these errors were encountered: