Merge pull request #5631 from docker/bump_sdk

Bump python SDK to 3.0.0
This commit is contained in:
Joffrey F 2018-02-01 14:51:05 -08:00 committed by GitHub
commit 8725385813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 4 additions and 7 deletions

View File

@ -243,7 +243,7 @@ class Container(object):
self.inspect()
def wait(self):
return self.client.wait(self.id)
return self.client.wait(self.id).get('StatusCode', 127)
def logs(self, *args, **kwargs):
return self.client.logs(self.id, *args, **kwargs)

View File

@ -972,7 +972,6 @@ class Service(object):
build_output = self.client.build(
path=path,
tag=self.image_name,
stream=True,
rm=True,
forcerm=force_rm,
pull=pull,

View File

@ -2,7 +2,7 @@ backports.ssl-match-hostname==3.5.0.1; python_version < '3'
cached-property==1.3.0
certifi==2017.4.17
chardet==3.0.4
docker==2.7.0
docker==3.0.0
docker-pycreds==0.2.1
dockerpty==0.4.1
docopt==0.6.2

View File

@ -36,7 +36,7 @@ install_requires = [
'requests >= 2.6.1, != 2.11.0, != 2.12.2, != 2.18.0, < 2.19',
'texttable >= 0.9.0, < 0.10',
'websocket-client >= 0.32.0, < 1.0',
'docker >= 2.7.0, < 3.0',
'docker >= 3.0.0, < 4.0',
'dockerpty >= 0.4.1, < 0.5',
'six >= 1.3.0, < 2',
'jsonschema >= 2.5.1, < 3',

View File

@ -32,7 +32,7 @@ def create_custom_host_file(client, filename, content):
)
try:
client.start(container)
exitcode = client.wait(container)
exitcode = client.wait(container)['StatusCode']
if exitcode != 0:
output = client.logs(container)

View File

@ -470,7 +470,6 @@ class ServiceTest(unittest.TestCase):
self.mock_client.build.assert_called_once_with(
tag='default_foo',
dockerfile=None,
stream=True,
path='.',
pull=False,
forcerm=False,
@ -513,7 +512,6 @@ class ServiceTest(unittest.TestCase):
self.mock_client.build.assert_called_once_with(
tag='default_foo',
dockerfile=None,
stream=True,
path='.',
pull=False,
forcerm=False,