-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Ensure default timeout is used by API Client #1634
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
Ensure default timeout is used by API Client #1634
Conversation
|
Please sign your commits following these rules: $ git clone -b "readtimeout_calling_container_stop" [email protected]:grahamlyons/docker-py.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -fAmending updates the existing PR. You DO NOT need to open a new one. |
The `from_env` method on the `docker` module passed `None` as the value for the `timeout` keyword argument which overrode the default value in the initialiser, taken from `constants` module. This sets the default in the initialiser to `None` and adds logic to set that, in the same way that `version` is handled. Signed-off-by: grahamlyons <[email protected]>
e5f87fc to
ee75a1c
Compare
|
Is the "janky" check configured correctly? It doesn't have a link to a Jenkins job and it hasn't completed on the last large handful of pull requests. |
|
I'm not sure what the failure on Jenkins relates to; can anybody assist with that? |
|
Please ignore the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only issue with this PR is that None has a special meaning for timeouts (requests docs).
We'd like to be able to pass `None` as a value for `timeout` because it has meaning to the `requests` library (http://docs.python-requests.org/en/master/user/advanced/#timeouts) Signed-off-by: grahamlyons <[email protected]>
04a5dcb to
ff993dd
Compare
|
@shin-, is that the kind of change you envisaged? Let me know if not. |
|
Yeah, I think that works! Thank you! |
|
Awesome. Thanks, @shin- |
The
from_envmethod on thedockermodule passedNoneas the value for thetimeoutkeyword argument which overrode the default value in the initialiser, taken fromconstantsmodule.This sets the default in the initialiser toNoneand adds logic to set that, in the same way thatversionis handled.This sets the default in
from_envto the default defined in theconstantsmodule.Addresses #1374