Skip to content

Commit

Permalink
Add status code 502 to the urllib retry list
Browse files Browse the repository at this point in the history
fixes pypa#11843
related pypa#12008
  • Loading branch information
bdraco committed Jan 30, 2024
1 parent 89950c5 commit 1e9b063
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pip/_internal/network/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,9 @@ def __init__(
# is typically considered a transient error so we'll go ahead and
# retry it.
# A 500 may indicate transient error in Amazon S3
# A 502 may be a transient error from a CDN
# A 520 or 527 - may indicate transient error in CloudFlare
status_forcelist=[500, 503, 520, 527],
status_forcelist=[500, 502, 503, 520, 527],
# Add a small amount of back off between failed requests in
# order to prevent hammering the service.
backoff_factor=0.25,
Expand Down

0 comments on commit 1e9b063

Please sign in to comment.