summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiaan van Stijn <thaJeztah@users.noreply.github.com>2020-08-07 16:45:20 +0200
committerGitHub <noreply@github.com>2020-08-07 16:45:20 +0200
commitb4beaaac8cafcec9fe9eb3d6903addd5d9bac4f2 (patch)
tree433e7a359d6983b17b776dac2dc1d25ad07cc5ca
parentcceae0c38490050368837d0ff5e3444c221b4c91 (diff)
downloaddocker-py-b4beaaac8cafcec9fe9eb3d6903addd5d9bac4f2.tar.gz
Update default API version to v1.39 (#2512)
* Update default API version to v1.39 When running the docker-py integration tests in the Moby repository, some tests were skipped because the API version used was too low: SKIPPED [1] tests/integration/api_service_test.py:882: API version is too low (< 1.38) SKIPPED [1] tests/integration/api_swarm_test.py:59: API version is too low (< 1.39) SKIPPED [1] tests/integration/api_swarm_test.py:38: API version is too low (< 1.39) SKIPPED [1] tests/integration/api_swarm_test.py:45: API version is too low (< 1.39) SKIPPED [1] tests/integration/api_swarm_test.py:52: API version is too low (< 1.39) While it's possible to override the API version to use for testing using the `DOCKER_TEST_API_VERSION` environment variable, we may want to set the default to a version that supports all features that were added. This patch updates the default API version to v1.39, which is the minimum version required for those features, and corresponds with Docker 18.09. Note that the API version of the current (19.03) Docker release is v1.40, but using that version as default would exclude users that did not update their Docker version yet (and would not be needed yet for the features provided). Signed-off-by: Sebastiaan van Stijn <github@gone.nl> * Makefile: set DOCKER_TEST_API_VERSION to v1.39 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
-rw-r--r--Makefile2
-rw-r--r--docker/constants.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 4795c63..6765d4d 100644
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,7 @@ integration-test: build
integration-test-py3: build-py3
docker run -t --rm -v /var/run/docker.sock:/var/run/docker.sock docker-sdk-python3 py.test -v tests/integration/${file}
-TEST_API_VERSION ?= 1.35
+TEST_API_VERSION ?= 1.39
TEST_ENGINE_VERSION ?= 19.03.12
.PHONY: setup-network
diff --git a/docker/constants.py b/docker/constants.py
index e4daed5..c09eeda 100644
--- a/docker/constants.py
+++ b/docker/constants.py
@@ -1,7 +1,7 @@
import sys
from .version import version
-DEFAULT_DOCKER_API_VERSION = '1.35'
+DEFAULT_DOCKER_API_VERSION = '1.39'
MINIMUM_DOCKER_API_VERSION = '1.21'
DEFAULT_TIMEOUT_SECONDS = 60
STREAM_HEADER_SIZE_BYTES = 8