From 08dc8ed9ae7b1819034ec4e1b3216f290c1a0acc Mon Sep 17 00:00:00 2001 From: Yuming Long Date: Thu, 16 Apr 2026 10:00:21 -0700 Subject: [PATCH 1/3] "" -> ""ReadError after 5 retries over 312s"" --- src/unstructured_client/_version.py | 2 +- src/unstructured_client/utils/retries.py | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/unstructured_client/_version.py b/src/unstructured_client/_version.py index 5bfb2929..3d9d10f2 100644 --- a/src/unstructured_client/_version.py +++ b/src/unstructured_client/_version.py @@ -3,7 +3,7 @@ import importlib.metadata __title__: str = "unstructured-client" -__version__: str = "0.43.2" +__version__: str = "0.43.3" __openapi_doc_version__: str = "1.2.31" __gen_version__: str = "2.680.0" __user_agent__: str = "speakeasy-sdk/python 0.43.2 2.680.0 1.2.31 unstructured-client" diff --git a/src/unstructured_client/utils/retries.py b/src/unstructured_client/utils/retries.py index 375d5e0a..0c0a63e7 100644 --- a/src/unstructured_client/utils/retries.py +++ b/src/unstructured_client/utils/retries.py @@ -172,7 +172,11 @@ def retry_with_backoff( if isinstance(exception, TemporaryError): return exception.response - raise + elapsed_seconds = (now - start) / 1000 + raise type(exception)( + f"{type(exception).__name__} after {retries + 1} retries " + f"over {elapsed_seconds:.1f}s: {exception}" + ) from exception sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1) sleep = min(sleep, max_interval / 1000) time.sleep(sleep) @@ -200,7 +204,11 @@ async def retry_with_backoff_async( if isinstance(exception, TemporaryError): return exception.response - raise + elapsed_seconds = (now - start) / 1000 + raise type(exception)( + f"{type(exception).__name__} after {retries + 1} retries " + f"over {elapsed_seconds:.1f}s: {exception}" + ) from exception sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1) sleep = min(sleep, max_interval / 1000) await asyncio.sleep(sleep) From 88598a07ddfa04be907ba73f50975b31c210704a Mon Sep 17 00:00:00 2001 From: Yuming Long Date: Thu, 16 Apr 2026 10:18:41 -0700 Subject: [PATCH 2/3] retry -> attempt --- src/unstructured_client/utils/retries.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unstructured_client/utils/retries.py b/src/unstructured_client/utils/retries.py index 0c0a63e7..4b903b58 100644 --- a/src/unstructured_client/utils/retries.py +++ b/src/unstructured_client/utils/retries.py @@ -174,7 +174,7 @@ def retry_with_backoff( elapsed_seconds = (now - start) / 1000 raise type(exception)( - f"{type(exception).__name__} after {retries + 1} retries " + f"{type(exception).__name__} after {retries + 1} attempts " f"over {elapsed_seconds:.1f}s: {exception}" ) from exception sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1) @@ -206,7 +206,7 @@ async def retry_with_backoff_async( elapsed_seconds = (now - start) / 1000 raise type(exception)( - f"{type(exception).__name__} after {retries + 1} retries " + f"{type(exception).__name__} after {retries + 1} attempts " f"over {elapsed_seconds:.1f}s: {exception}" ) from exception sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1) From 400e8e532de1b859f0bc0f412a279e35b618e0c3 Mon Sep 17 00:00:00 2001 From: Yuming Long Date: Thu, 16 Apr 2026 10:18:52 -0700 Subject: [PATCH 3/3] bump --- src/unstructured_client/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unstructured_client/_version.py b/src/unstructured_client/_version.py index 3d9d10f2..e3a41815 100644 --- a/src/unstructured_client/_version.py +++ b/src/unstructured_client/_version.py @@ -6,7 +6,7 @@ __version__: str = "0.43.3" __openapi_doc_version__: str = "1.2.31" __gen_version__: str = "2.680.0" -__user_agent__: str = "speakeasy-sdk/python 0.43.2 2.680.0 1.2.31 unstructured-client" +__user_agent__: str = "speakeasy-sdk/python 0.43.3 2.680.0 1.2.31 unstructured-client" try: if __package__ is not None: