httpx icon indicating copy to clipboard operation
httpx copied to clipboard

Fix client.send() timeout when used with a new Request instance

Open alexgmin opened this issue 1 year ago • 0 comments
trafficstars

Summary

Discussion here https://github.com/encode/httpx/discussions/3110

On httpx.client.send(), now the timeout of the request is set if not set already. This is for cases in which httpx.client.send() is used with httpx.Request() instead of client.build_request()

I expected timeout tests for the non-async client too. But since there are only async tests I didn't create a non-async test.

I didn't think a documentation change was needed since this is (for me) the expect behavior.

Checklist

  • [X] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • [X] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • [ ] I've updated the documentation accordingly.

alexgmin avatar Feb 23 '24 21:02 alexgmin