Skip to content

0.6.0

Latest

Choose a tag to compare

@will-ockmore will-ockmore released this 06 Jul 00:52
a7aa1f3

Added

  • retry_request and aretry_request helpers, which run the retry loop at the client level so that
    errors raised while reading the response body (such as ReadTimeout and RemoteProtocolError) are
    retried. This is something RetryTransport cannot do, as transports return before the body is read.
    They reject a client that already uses RetryTransport to avoid retrying every request twice. (#79 by
    @will-ockmore)
  • validate_response option on Retry to retry when a callback rejects an otherwise-successful
    response (for example, content-level blocks such as a CAPTCHA or authorization wall). (#74 by @vgavro)
  • request.extensions["retry"] support, allowing the Retry configuration to be overridden per
    request; the resolved Retry is also attached to response.extensions["retry"] for introspection. (#75
    by @vgavro)
  • Retry.copy_with to derive a modified Retry (mirroring httpx.URL.copy_with), convenient for
    per-request overrides via request.extensions["retry"]. (#75 by @vgavro)