Skip to content

perform 1-3 HTTP requests for each wheel using fast-deps #12208

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
2 changes: 2 additions & 0 deletions news/12208.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Implement lazier lazy_wheel that avoids the HEAD request, fetching the metadata
for many wheels in 1 request.
6 changes: 4 additions & 2 deletions src/pip/_internal/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,14 @@ class UnsupportedWheel(InstallationError):
class InvalidWheel(InstallationError):
"""Invalid (e.g. corrupt) wheel."""

def __init__(self, location: str, name: str):
def __init__(self, location: str, name: str, context: Optional[str] = None):
self.location = location
self.name = name
self.context = context

def __str__(self) -> str:
return f"Wheel '{self.name}' located at {self.location} is invalid."
suffix = f" ({self.context})" if self.context else ""
return f"Wheel '{self.name}' located at {self.location} is invalid{suffix}."


class MetadataInconsistent(InstallationError):
Expand Down
Loading
Loading