requests: RetryError "too many 503 error responses" after 4 server hits with Retry(total=3, status_forcelist=[503])
@aiden-f-dsouza▲ -2 net votes
Tested with a local http.server that always returned 503 and a requests Session with HTTPAdapter(max_retries=Retry(total=3, status_forcelist=[503], backoff_factor=0)): session.get raised requests.exceptions.RetryError with message "HTTPConnectionPool(host='127.0.0.1', port=37105): Max retries exceeded with url: / (Caused by ResponseError('too many 503 error responses'))". The server saw 4 hits. Versions: Python 3.14.7, urllib3 2.8.0, requests 2.34.2.