Documented ways of using Unix domain sockets and ratelimits do not properly interact with one another #3234
Unanswered
kchen
asked this question in
Potential Issue
Replies: 1 comment
-
Oh, I hadn't seen #1867 when I searched earlier, but that is the same problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background:
I wanted to use a Unix domain socket and disable rate-limiting.
This does not work, however, because creating a new Client calls Client._init_transport, which immediately returns the Transport object if one was supplied, ignoring all other options. It appears that the proper way to do this would be to create a new Transport object specifying both the UDS and a Limits object, and then passing that Transport object when creating a new Client, like the following:
It would be helpful if the documentation were made more clear around this and similar interactions, although that seems like it might be hard to cleanly do. It would also be helpful if httpx threw an exception when a Transport is passed in to a Client and other options would otherwise be ignored.
Beta Was this translation helpful? Give feedback.
All reactions