Changelog
v1.4.0
- Added support for
aiohttp([#28])(https://github.com/austind/retryhttp/pull/28) - Dropped support for Python 3.8, added support for Python 3.13 (#29)
- Bugfix: Prevent installing both
requestsandhttpxunless specified (#26)
v1.3.3
- Bugfix: Pass error types to wait strategy in retry decorator (#25)
v1.3.2
- Bugfix: Don't pass
stop,wait, andretrykeyword arguments fromretryhttp.retryon totenacity.retry()(#23)
v1.3.1
- Fixed all outstanding mypy errors. (#20)
v1.3.0
- Fix typing error (#15)
- Add default fallback wait strategy [
tenacity.wait_random_exponential][] toretryhttp.wait_from_headerandretryhttp.wait_retry_after(#17)
v1.2.0
- Added
wait_maxargument toretryhttp.wait_from_headerandretryhttp.wait_retry_after, which defaults to 120.0 seconds. - [
retryhttp._utils.is_rate_limited][]: revert behavior to correctly determine rate limiting by a429 Too Many Requests` status. - When receiving
503 Service Unavailable, honor aRetry-Afterheader if provided. - Rename
retryhttp.wait_rate_limitedtoretryhttp.wait_retry_after, but retain alias for backwards compatibility and convenience. retryhttp.wait_from_header: Handle case if server responds with a date in the past.retryhttp.wait_context_aware: Thewait_server_errorsargument now defaults toretryhttp.wait_retry_afterwith [tenacity.wait_random_exponential][] as fallback, since some server errors may respond with aRetry-After` header.retryhttp.wait_context_aware: Thewait_rate_limitedargument now has [tenacity.wait_random_exponential][] as fallback toretryhttp.wait_retry_after, to make retrying rate-limited requests more robust.
v1.1.0
- Add HTTP-date value parsing for
retryhttp.wait_from_header - [
retryhttp._utils.is_rate_limited][] now determines that a request was rate limited by the presence of aRetry-Afterheader. In prior versions, this was based on the status code429 Too Many Requests. However, many servers return other status codes when rate limiting.
v1.0.1
- Fix documentation errors.
v1.0.0
- API is now stable. Any breaking changes will follow SemVer guidelines.
- Added
requests.exceptions.ChunkedEncodingErrorto the list of default network errors.
v0.2.0
- Rename
retryhttp.retry_http_errorstoretryhttp.retry. - Rename
retryhttp.wait_http_errorstoretryhttp.wait_context_aware. - Restructure project so all members are part of the root namespace.
- Move type delcarations to
retryhttp._types. - Enable bare decorator syntax for
retryhttp.retry(i.e.,@retryworks as well as@retry())
v0.1.0
Initial release.
Added the following methods and classes:
retryhttp.retry_http_errorsretryhttp.retry_if_network_errorretryhttp.retry_if_rate_limitedretryhttp.retry_if_server_errorretryhttp.retry_if_timeoutretryhttp.wait_from_header- [
retryhttp.wait_rate_limited][] retryhttp.wait_context_aware