You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3b128d1
Browse filesBrowse the repository at this point in the historyBrowse files
fix: allow max_retries=0 to disable retries (#1142)
`max_retries` counts retries, so `0` should mean a single attempt.
Instead, every request with `max_retries=0` raised `ValueError` from the
retry loop. Now `0` disables retries, and a negative value raises
`ValueError` when `ApifyClient`, `ApifyClientAsync` or an HTTP client is
constructed.
This is a regression from 3.0.0. Up to 2.5.1, `max_retries=0` made
exactly one attempt; the `ValueError` check came in with #604. The JS
client also accepts `0`.
The tests in `test_client_errors.py` that meant to avoid retries used
`max_retries=1`, which still retries once. They now use `0`.
Closes: #1139
*✍️ Drafted by Claude Code*
0 commit comments