-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Continue on client errors when fetching wheel metadata #12255
base: main
Are you sure you want to change the base?
Conversation
32051df
to
44398b1
Compare
44398b1
to
9a6c07b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, slight preference for making this opt-in
I need to see what this looks like when you fail to authenticate with all wheels for a given server. |
Can we make this an opt-in setting per index? I'm not sure what to call it yet. |
Oh no, a name... |
hint: Pre-releases are available for `anyio` in the requested range (e.g., 4.0.0rc1), but pre-releases weren't enabled (try: `--prerelease=allow`) | ||
|
||
hint: Metadata for `anyio` (v4.3.0) could not be fetched; the server returned: `401 Unauthorized` | ||
help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooooh, this is terrific. That error message by itself is quite a potent troubleshooting aide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P.S. if this test case were cloned with --prerelease=allow
, it should succeed, right?
Summary
This PR allows the resolver to continue (backtrack) when wheel metadata fetches fail due to a client error (like a 403). We may want this to be opt-in?
Closes #5260.
If all distributions can't be fetched, you get something like this: