|
@@ -13,7 +13,7 @@ import docker
|
|
import pytest
|
|
import pytest
|
|
import requests
|
|
import requests
|
|
from _pytest._code.code import ReprExceptionInfo
|
|
from _pytest._code.code import ReprExceptionInfo
|
|
-from distutils.version import LooseVersion
|
|
|
|
|
|
+from packaging.version import Version
|
|
from docker.models.containers import Container
|
|
from docker.models.containers import Container
|
|
from requests.packages.urllib3.util.connection import HAS_IPV6
|
|
from requests.packages.urllib3.util.connection import HAS_IPV6
|
|
|
|
|
|
@@ -557,5 +557,5 @@ try:
|
|
except docker.errors.ImageNotFound:
|
|
except docker.errors.ImageNotFound:
|
|
pytest.exit("The docker image 'nginxproxy/nginx-proxy:test' is missing")
|
|
pytest.exit("The docker image 'nginxproxy/nginx-proxy:test' is missing")
|
|
|
|
|
|
-if LooseVersion(docker.__version__) < LooseVersion("5.0.0"):
|
|
|
|
|
|
+if Version(docker.__version__) < Version("5.0.0"):
|
|
pytest.exit("This test suite is meant to work with the python docker module v5.0.0 or later")
|
|
pytest.exit("This test suite is meant to work with the python docker module v5.0.0 or later")
|