httpx icon indicating copy to clipboard operation
httpx copied to clipboard

Fixing missed arguments for pools when init transports

Open NewUserHa opened this issue 1 year ago • 5 comments

Summary

https://github.com/encode/httpx/blob/5b5f6d8e172910371b5901f6e21717097274c513/httpx/_transports/default.py#L258-L330 eg.

  • in AsyncHTTPTransport, AsyncConnectionPool has the argument of retries passed in, but AsyncHTTPProxy and AsyncSOCKSProxy have not;
  • in HTTPTransport, it has the same issue.

discussion: https://github.com/encode/httpx/discussions/2988

This also requires a fix in https://github.com/encode/httpcore

Checklist

  • [X] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • [ ] 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.

NewUserHa avatar Dec 09 '23 20:12 NewUserHa

The PR requires https://github.com/encode/httpcore/pull/857 PR to pass checks

NewUserHa avatar Dec 10 '23 00:12 NewUserHa

The PR requires https://github.com/encode/httpcore/pull/857 PR to pass checks

Can we just start by considering retries here? That's already supported by httpcore>1.0, right?

tomchristie avatar Dec 11 '23 13:12 tomchristie

Ok, done.

Should open a new PR for the rest missed arguments?

NewUserHa avatar Dec 11 '23 19:12 NewUserHa

Okay, first up let's just have a sanity check... do connection retries actually get applied when connecting to proxies?

tomchristie avatar Dec 12 '23 13:12 tomchristie

The SocksProxy?

NewUserHa avatar Dec 12 '23 14:12 NewUserHa