Skip to content
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

Add timeout parameter to AuthorizedSession.request() #396

Closed
plamut opened this issue Dec 5, 2019 · 1 comment · Fixed by #397 or #406
Closed

Add timeout parameter to AuthorizedSession.request() #396

plamut opened this issue Dec 5, 2019 · 1 comment · Fixed by #397 or #406
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@plamut
Copy link
Contributor

plamut commented Dec 5, 2019

As a Google Cloud client library developer, I would like an easy way of specifying a timeout when making API calls using the requests.AuthorizedSession transport, for example:

transport = AuthorizedSession(...)
transport.request(..., timeout=42)

Motivation:
Sometimes the BigQuery client gets stuck at the transport layer. Having a timeout parameter that can be passed to the transport is necessary for fixing several issue, for example: googleapis/google-cloud-python#9875 (comment)

@plamut plamut added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Dec 5, 2019
@plamut plamut self-assigned this Dec 5, 2019
@plamut
Copy link
Contributor Author

plamut commented Dec 10, 2019

Reopening, as #397 caused a regression in downstream libraries and had to be reverted.

The bug is caused when receiving a non-numeric timeout value - it can also be a tuple of values, thus the logic needs to account for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
1 participant