diff --git a/docker-compose-1.19.0-docker3.patch b/docker-compose-1.19.0-docker3.patch new file mode 100644 index 0000000..0290165 --- /dev/null +++ b/docker-compose-1.19.0-docker3.patch @@ -0,0 +1,99 @@ +From d8d484e0e19db5326afeb4cdf56864eceb81566c Mon Sep 17 00:00:00 2001 +From: Joffrey F +Date: Wed, 31 Jan 2018 18:54:58 -0800 +Subject: [PATCH] Bump python SDK to 3.0.0 + +Signed-off-by: Joffrey F +--- + compose/container.py | 2 +- + compose/service.py | 1 - + requirements.txt | 2 +- + setup.py | 2 +- + tests/helpers.py | 2 +- + tests/unit/service_test.py | 2 -- + 6 files changed, 4 insertions(+), 7 deletions(-) + +diff --git a/compose/container.py b/compose/container.py +index 4ab99ffa8..9323b1192 100644 +--- a/compose/container.py ++++ b/compose/container.py +@@ -243,7 +243,7 @@ def inspect_if_not_inspected(self): + 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) +diff --git a/compose/service.py b/compose/service.py +index b1f7d707b..b3d911135 100644 +--- a/compose/service.py ++++ b/compose/service.py +@@ -972,7 +972,6 @@ def build(self, no_cache=False, pull=False, force_rm=False, memory=None, build_a + build_output = self.client.build( + path=path, + tag=self.image_name, +- stream=True, + rm=True, + forcerm=force_rm, + pull=pull, +diff --git a/requirements.txt b/requirements.txt +index bc483b4b7..100e72117 100644 +--- a/requirements.txt ++++ b/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 +diff --git a/setup.py b/setup.py +index a75e0cb7f..a85bcdf72 100644 +--- a/setup.py ++++ b/setup.py +@@ -36,7 +36,7 @@ def find_version(*file_paths): + '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', +diff --git a/tests/helpers.py b/tests/helpers.py +index f151f9cde..dd1299811 100644 +--- a/tests/helpers.py ++++ b/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) +diff --git a/tests/unit/service_test.py b/tests/unit/service_test.py +index 92d7f08d5..21bac8b83 100644 +--- a/tests/unit/service_test.py ++++ b/tests/unit/service_test.py +@@ -470,7 +470,6 @@ def test_create_container(self): + self.mock_client.build.assert_called_once_with( + tag='default_foo', + dockerfile=None, +- stream=True, + path='.', + pull=False, + forcerm=False, +@@ -513,7 +512,6 @@ def test_ensure_image_exists_force_build(self): + self.mock_client.build.assert_called_once_with( + tag='default_foo', + dockerfile=None, +- stream=True, + path='.', + pull=False, + forcerm=False, diff --git a/docker-compose.spec b/docker-compose.spec index cdb8e40..8e645fa 100644 --- a/docker-compose.spec +++ b/docker-compose.spec @@ -9,7 +9,7 @@ Name: docker-compose Version: 1.19.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Multi-container orchestration for Docker License: ASL 2.0 @@ -19,6 +19,8 @@ Source0: https://files.pythonhosted.org/packages/source/d/%{name}/%{name} # Upstream uses environment markers to conditionally apply some dependencies. # Environment markers were first added in setuptools 20.6.8. Patch2: allow-older-setuptools.patch +# Backport upstream d8d484e for compatibility with python-docker 3.0.0 +Patch3: docker-compose-1.19.0-docker3.patch # docker-compose is compatible with fig and is a simple rename. # Currently it only prints deprecation warnings for changed functionality. @@ -114,6 +116,9 @@ install -D -p -m 644 contrib/completion/fish/docker-compose.fish %{buildroot}%{_ %{_datadir}/fish %changelog +* Fri Mar 02 2018 Adam Williamson - 1.19.0-2 +- Backport upstream patch for compatibility with python-docker 3.0.0 + * Mon Feb 19 2018 Michael Hampton - 1.19.0-1 - Update to 1.19.0