-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
type: feature requestRequest for a new featureRequest for a new feature
Description
What's the problem this feature will solve?
When a HTTP error occurs during install, pip retries when the error is 500, 503, 520, 527 (see
pip/src/pip/_internal/network/session.py
Lines 350 to 360 in 4b14e7c
| retries = urllib3.Retry( | |
| # Set the total number of retries that a particular request can | |
| # have. | |
| total=retries, | |
| # A 503 error from PyPI typically means that the Fastly -> Origin | |
| # connection got interrupted in some way. A 503 error in general | |
| # is typically considered a transient error so we'll go ahead and | |
| # retry it. | |
| # A 500 may indicate transient error in Amazon S3 | |
| # A 520 or 527 - may indicate transient error in CloudFlare | |
| status_forcelist=[500, 503, 520, 527], |
Describe the solution you'd like
Pip should retry when a 502 error occurs
Alternative Solutions
As an alternative, pip could maintain a opinionated list of retry codes but allow users to overwrite/add new ones so that it fits their needs.
Additional context
n/a
Code of Conduct
- I agree to follow the PSF Code of Conduct.
jarus, kasium, GeorgeSirois, arrdem, whme and 3 more
Metadata
Metadata
Assignees
Labels
type: feature requestRequest for a new featureRequest for a new feature