Skip to content

v0.7.0

Latest

Choose a tag to compare

@chokoswitch chokoswitch released this 19 Jul 05:06
fd1515b

This release adds some more features to reflect user feedback, while fixing some docs issues and timeout handling in the HTTPX adapter. This comes with a minor breaking change to the behavior of the retry middleware.

☢️ Breaking changes

  • Retry middleware now defaults to always retrying requests on a connection error, while checking method idempotency for any other. This should be transparent to anyone using the default middleware but if you override response handling for custom logic, you may need to add method idempotency checking there.

Before

class MyRetryMiddleware(RetryMiddleware):
  def should_retry_response(self, request: Request, response: Response | Exception
    ) -> bool:
      return response.status >= 500

After

class MyRetryMiddleware(RetryMiddleware):
  def should_retry_response(self, request: Request, response: Response | Exception
    ) -> bool:
      if request.method in ("GET", "HEAD", "PUT", "DELETE"):
        return False
      return response.status >= 500

🛠️ Bug fixes

📈 Enhancements

New Contributors

Full Changelog: v0.6.2...v0.7.0