Browse Source

Merge pull request #5631 from docker/bump_sdk

Bump python SDK to 3.0.0
Joffrey F 7 years ago
parent
commit
8725385813
6 changed files with 4 additions and 7 deletions
  1. 1 1
      compose/container.py
  2. 0 1
      compose/service.py
  3. 1 1
      requirements.txt
  4. 1 1
      setup.py
  5. 1 1
      tests/helpers.py
  6. 0 2
      tests/unit/service_test.py

+ 1 - 1
compose/container.py

@@ -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)

+ 0 - 1
compose/service.py

@@ -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,

+ 1 - 1
requirements.txt

@@ -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

+ 1 - 1
setup.py

@@ -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',

+ 1 - 1
tests/helpers.py

@@ -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)

+ 0 - 2
tests/unit/service_test.py

@@ -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,