-
Notifications
You must be signed in to change notification settings - Fork 6k
[Python] Add support for request timeout #4173
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
Conversation
|
Travis CI failed with the following error: Ref: https://api.travis-ci.org/jobs/175005279/log.txt?deansi=true Please take a look when you've time. |
|
I've updated the test and it should pass now. |
* [Python] Add support for request timeout * Update python petstore api * [Python] Add test for request timeout
|
@mbohlool @wing328 thank you for this feature! is there a way to configure this timeout when generating the client? We generate like this: But it seems the client side just uses urllib3's urlopen and the default timeout for that is infinite |
Unfortunately, as far as I can tell, swagger-codgen providss no way to set a default timeout. Instead, I littered our code with explicit timeout arguments to k8s API calls. The best documentation of this feature of swagger-codegen that I have found is the PR that adds the feature: swagger-api/swagger-codegen#4173
Unfortunately, as far as I can tell, swagger-codgen providss no way to set a default timeout. Instead, I littered our code with explicit timeout arguments to k8s API calls. The best documentation of this feature of swagger-codegen that I have found is the PR that adds the feature: swagger-api/swagger-codegen#4173
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)2.3.0branch for breaking (non-backward compatible) changes.Description of the PR
Similar to #4166 adding support for a timeout flag called _request_timeout.
fixes #4169