-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How should we pass options for http clients in service client creation? #3109
Comments
This question should likely be informed by #1998, since how that implementation is done may affect this. I would also be okay with only supporting a situation like a custom timeout if they use our default objects. |
I am 👍 on the idea to make it configurable, but I really wish we had an easier way of passing in custom transport objects. For example import urllib3
pool_manager = urllib3.PoolManager(timeout=10) |
This is probably an artifact of httplib2, all other transports can accept a timeout per-request. |
So is this something that should wait, and maybe focus on #1998 first? |
Defer to @dhermes, but that is my take on it. |
So many things will be easier once we nail #1998. |
Closing for now. #1998 is in progress. |
Hi @lukesneeringer. I wonder if you could explain how #1998 solves the problems raised in this issue. From what I've been able to dig up, there is no way to set up a timeout/retries for a client in a simple and clean way (i.e. not involving private APIs nor deprecated parameters). The closest would be the timeout decorators (defined in |
In order to address #2988, where timeouts are not a service option, but need to be handled by the HTTP client.
How should we handle passing arguments like
timeout
when creating a service client?This value could then be passed here but we would need to assume the argument was available.
In this case
google_auth_httplib2.AuthorizedHttp
doesn't take the argument but rather an already created http client.We could make another mixin class for
Client
I suppose that supports settingtimeout
?The text was updated successfully, but these errors were encountered: