-
Notifications
You must be signed in to change notification settings - Fork 901
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lift requirement that .egg-info filenames must include version (#6179)
## Summary PR #4533 introduced (almost) spec compliant parsing of `.egg-info` filenames, but added the overly strict requirement that the distribution version must be present. This causes various `uv pip` operations to fail in environments where there are `.egg-info` files without a version component, so loosen this check by making the version component optional and reading the version from the egg metadata when it is not present. As an example of the issue, running `uv pip list` on my system currently results in ``` error: Failed to read metadata from: `/usr/lib/python3.12/site-packages/PySide6.egg-info` Caused by: The `.egg-info` filename "PySide6.egg-info" is missing a version ``` whereas regular `pip list` succeeds: ``` $ pip list | rg -S pyside PySide6 6.7.2 ``` ## Test Plan This has been tested by altering the `.egg-info` filename tests as needed and ensuring the full test suite passes locally.
- Loading branch information
Showing
2 changed files
with
75 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters