Skip to content

Fix zero retry limits being ignored when cloning clients - #607

Open
Shubham-Padkonde wants to merge 1 commit into
dropbox:mainfrom
Shubham-Padkonde:fix/clone-zero-retry-limits
Open

Shubham-Padkonde wants to merge 1 commit into
dropbox:mainfrom
Shubham-Padkonde:fix/clone-zero-retry-limits

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Cloning a client with max_retries_on_error=0 or max_retries_on_rate_limit=0 currently retains the original retry limit because clone() uses truthiness to choose defaults. For example, cloning a client with a limit of 2 still makes three requests after explicitly disabling retries.

Use an explicit None check for both retry settings so zero disables retries while omitted values retain the original limits. The regression tests exercise the retry loop for server errors and rate limits, check that it does not sleep, and verify that the original client and default clones retain their settings.

Validation: both regression cases failed before the fix; all 102 unit tests pass on Python 3.13 afterward. Ruff lint and formatting checks pass. Live API integration tests were not run.

@CLAassistant

CLAassistant commented Oct 3, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants