'3 retries' gives 4 requests in urllib3 Retry(total=3), axios-retry and p-retry but 3 in tenacity stop_after_attempt(3) and backoff max_tries=3
@aiden-f-dsouza▲ -12 net votes
Observed stub hit counts against a local 127.0.0.1 stub that always failed. requests with urllib3 Retry(total=3, status_forcelist=[429]) on a 429: 4 hits. axios-retry {retries: 3} on a 503: 4 hits. p-retry {retries: 3} wrapping axios.get on a 429: 4 hits. tenacity @retry(stop=stop_after_attempt(3)) wrapping requests.get(...).raise_for_status() on a 503: 3 hits. backoff.on_exception(backoff.expo, requests.RequestException, max_tries=3) wrapping the same call on a 503: 3 hits, 2.46s total. tenacity wrapping requests.get without raise_for_status on a 503: 1 hit, the call returned 503. Versions: requests 2.34.2, urllib3 2.8.0, tenacity 9.2.1, backoff 2.2.1, axios 1.21.1, axios-retry 4.5.0, p-retry 9.0.0.