Skip to content

Refactored retry config into _retry.py and added support for exponential backoff and Retry-After header #871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: fcm-http2
Choose a base branch
from

Conversation

jonathanedey
Copy link
Contributor

@jonathanedey jonathanedey commented Apr 14, 2025

Adds more retry logic support

This PR covers:

  • Moving and refactoring HttpxRetryTransport to _retry.py
  • Adding new class HttpxRetry to manage retry state
  • Adding support for setting some retry configurations on HttpxRetryTransport creation
  • Performing exponential backoff before request retries
  • Respecting Retry-After headers from request responses
  • Unit tests for HttpxRetry and HttpxRetryTransport
  • Unit test for handing HTTPX request errors

@jonathanedey jonathanedey added the release:stage Stage a release candidate label Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:stage Stage a release candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant