-
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" git@github.com:grahamlyons/docker-py.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f Amending 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 <graham@grahamlyons.com>
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 <graham@grahamlyons.com>
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_env
method on thedocker
module passedNone
as the value for thetimeout
keyword argument which overrode the default value in the initialiser, taken fromconstants
module.This sets the default in the initialiser toNone
and adds logic to set that, in the same way thatversion
is handled.This sets the default in
from_env
to the default defined in theconstants
module.Addresses #1374