-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
Description
Request for comment (RFC) for potential feature:
To allow a user to define more complex retries not available through constructor options we could provide a retry base class that has abstract methods that the user can inherit from and design.
For example, if I want infinite retries on 1XX status codes with not backoff or jitter but provide an allowance for 4XX and 5XX status codes with backoff or jitter I don't see a way to do that today.
Example:
from httpx_retries import BaseRetry, RetryTransport
class MySuperComplexRetry(BaseRetry):
# need to clarify which abstract methods need to be defined
...
transport = RetryTransport(retry=MySuperComplexRetry())An alternative already exists for this today since the user can technically just subclass Retry and override methods but this may present a cleaner option so that we could define the exact methods that an BaseRetry child class must define.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested