diff --git a/README.md b/README.md index b9b9ab2..1a436e0 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ Error codes are as followed: ### Retries -Certain errors are automatically retried 1 times by default, with a short exponential backoff. +Certain errors are automatically retried 0 times by default, with a short exponential backoff. Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors are all retried by default. diff --git a/src/dataherald/_constants.py b/src/dataherald/_constants.py index eb53177..15568ee 100644 --- a/src/dataherald/_constants.py +++ b/src/dataherald/_constants.py @@ -7,7 +7,7 @@ # default timeout is 6 minutes DEFAULT_TIMEOUT = httpx.Timeout(timeout=360.0, connect=5.0) -DEFAULT_MAX_RETRIES = 1 +DEFAULT_MAX_RETRIES = 0 DEFAULT_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20) INITIAL_RETRY_DELAY = 0.5 diff --git a/tests/test_client.py b/tests/test_client.py index 671248e..baf23b7 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -87,7 +87,7 @@ def test_copy_default_options(self) -> None: # options that have a default are overridden correctly copied = self.client.copy(max_retries=7) assert copied.max_retries == 7 - assert self.client.max_retries == 1 + assert self.client.max_retries == 0 copied2 = copied.copy(max_retries=6) assert copied2.max_retries == 6 @@ -763,7 +763,7 @@ def test_copy_default_options(self) -> None: # options that have a default are overridden correctly copied = self.client.copy(max_retries=7) assert copied.max_retries == 7 - assert self.client.max_retries == 1 + assert self.client.max_retries == 0 copied2 = copied.copy(max_retries=6) assert copied2.max_retries == 6