Skip to content

feat: add native httpx retries to synchronous and asynchronous clients - #44

Closed
Chethan-Raj-D-S wants to merge 1 commit into
prooflinedev:mainfrom
Chethan-Raj-D-S:feat/add-httpx-retries
Closed

Chethan-Raj-D-S wants to merge 1 commit into
prooflinedev:mainfrom
Chethan-Raj-D-S:feat/add-httpx-retries

Conversation

@Chethan-Raj-D-S

Copy link
Copy Markdown

Description

When integrating the SDK into async deployment pipelines, transient network blips or underlying cloud provider 50X errors cause hard crashes. This PR introduces a configurable max_retries parameter (default: 3) to the Proofline client, leveraging httpx native HTTPTransport and AsyncHTTPTransport retry mechanics to improve resiliency out-of-the-box.

Implementation Details

  • Added max_retries to client initialization.
  • Injected httpx.HTTPTransport(retries=max_retries) and httpx.AsyncHTTPTransport(retries=max_retries).
  • Added mock tests in tests/ verifying retry execution on 503 responses.

Testing Notes & CI Baseline

  • Pytest: pytest passes. Note: test_body_stream_deadline_does_not_turn_authority_into_timeout exhibited flakiness (timing sensitivity), but this behavior is pre-existing on main.
  • Ruff: ruff check . passes cleanly.
  • Mypy: The new implementation and tests type-check cleanly. Note: mypy . surfaces 5 pre-existing errors in tests/test_http.py on main, as the local scripts/check.py gate currently only targets proofline and scripts.

mohsen1 commented Nov 17, 2026

Copy link
Copy Markdown
Member

Codex

Closing as out of scope. We’re keeping the SDK focused on the existing API and small, necessary client helpers.

@mohsen1 mohsen1 closed this Nov 17, 2026
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