FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: add native httpx retries to synchronous and asynchronous clients by Chethan-Raj-D-S · Pull Request #44 · prooflinedev/sdk-python · GitHub

Repository navigation

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

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

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

Conversation

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.

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL