Upgrade from docker-py to docker

The pypi package 'docker-py' [1] has been renamed to 'docker' [2].
It is better to move to the new 'docker' package because the old
package will be deprecated and all the new features will go into
the new package only.

Package 'docker' has been added to requirements [3]. The old
package 'docker-py' is still allowed to be in the global requirements
during the transition period but it should be removed after all or
most of the projects finsih the migration.

[1] https://pypi.python.org/pypi/docker-py
[2] https://pypi.python.org/pypi/docker
[3] https://review.openstack.org/#/c/423715/

Change-Id: Icc57428e29feecaf9a06295585092dcb7df7f51d
This commit is contained in:
Hongbin Lu 2017-06-20 22:01:27 +00:00
parent 555d0c8856
commit 0c055a1d44
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ class DockerSetup(threading.Thread):
"""Build a docker container from the given Dockerfile and start
the container in a separate thread."""
try:
self.client = docker.Client(version='auto')
self.client = docker.APIClient(version='auto')
is_ok = self.client.ping()
if is_ok != 'OK':
msg = 'Docker daemon ping failed.'

View File

@ -19,7 +19,7 @@ testtools>=1.4.0 # MIT
oslosphinx>=4.7.0 # Apache-2.0
# Functional testing
docker-py>=1.8.1 # Apache-2.0
docker>=2.0.0 # Apache-2.0
requests!=2.12.2,!=2.13.0,>=2.10.0 # Apache-2.0
retrying!=1.3.0,>=1.2.3 # Apache-2.0
PyMySQL>=0.7.6 # MIT License