-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
What's the problem this feature will solve?
pip automatically retries after hitting a network error, but the warning it emits is cryptic to users without experience on networking applications.
The typical message a user gets would be something like:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after
connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection
object at 0x0000020EA6576108>, 'Connection to pypi.org timed out. (connect timeout=15)')': /some/url/
This is not too difficult to discern the error message as a client side networking issue with some Python and network experience. Less experienced users, however, cannot understand what to do to the cryptic output, and end up posting issues.
Describe the solution you'd like
Following the recent effort to format more user-friendly error messages, output a more descriptive message that says
- What is likely happening.
- What can the user do to the error.
- Link to some documentation for further reading.
Additional context
I have not thought deep into how this should be implemented, to be honest. We should probably do two things:
- Make the retry warning more descriptive by replacing the
Retry(...)
andConnectTimeoutError(...)
objects’ appearances (__repr__
?) in it. - Wrap the network call, and output the user-friendly message described above when the retry limit is hit.