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 >= 500After
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
- Fix async timeout for httpx adapter by @chokoswitch in #187
📈 Enhancements
- Default retry middleware to retrying connection errors by @chokoswitch in #184
- Add option to enable system certs along with provided by @chokoswitch in #179
- Add httpx-style proxy parameter to transports by @mishushakov in #180
- Add macOS Intel (x86_64) wheels to release workflow by @mishushakov in #183
New Contributors
- @ofek made their first contribution in #177
- @mishushakov made their first contribution in #180
Full Changelog: v0.6.2...v0.7.0