diff options
| author | Joffrey F <joffrey@docker.com> | 2015-01-09 15:24:22 -0800 |
|---|---|---|
| committer | Joffrey F <joffrey@docker.com> | 2015-01-09 15:24:22 -0800 |
| commit | 9e295d666aa831eb32665bb7e748e3eab0f06a0c (patch) | |
| tree | 8abce89ea4f9ace8e0167634483a8ea9bb865b55 | |
| parent | 1f8cde85606876d85425de6f8a6ccec8b54cfb9f (diff) | |
| download | docker-py-9e295d666aa831eb32665bb7e748e3eab0f06a0c.tar.gz | |
urllib3/requests issues
| -rw-r--r-- | docker/ssladapter/ssladapter.py | 6 | ||||
| -rw-r--r-- | docker/unixconn/unixconn.py | 10 | ||||
| -rw-r--r-- | setup.py | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/docker/ssladapter/ssladapter.py b/docker/ssladapter/ssladapter.py index 06c3761..9727d37 100644 --- a/docker/ssladapter/ssladapter.py +++ b/docker/ssladapter/ssladapter.py @@ -5,11 +5,11 @@ from distutils.version import StrictVersion from requests.adapters import HTTPAdapter import ssl + try: - import urllib3 -except ImportError: import requests.packages.urllib3 as urllib3 - +except ImportError: + import urllib3 PoolManager = urllib3.poolmanager.PoolManager diff --git a/docker/unixconn/unixconn.py b/docker/unixconn/unixconn.py index 841778c..1f18060 100644 --- a/docker/unixconn/unixconn.py +++ b/docker/unixconn/unixconn.py @@ -21,9 +21,9 @@ import requests.adapters import socket try: - import urllib3 -except ImportError: import requests.packages.urllib3 as urllib3 +except ImportError: + import urllib3 class UnixHTTPConnection(httplib.HTTPConnection, object): @@ -77,9 +77,9 @@ class UnixAdapter(requests.adapters.HTTPAdapter): if pool: return pool - pool = UnixHTTPConnectionPool(self.base_url, - socket_path, - self.timeout) + pool = UnixHTTPConnectionPool( + self.base_url, socket_path, self.timeout + ) self.pools[socket_path] = pool return pool @@ -7,7 +7,7 @@ ROOT_DIR = os.path.dirname(__file__) SOURCE_DIR = os.path.join(ROOT_DIR) requirements = [ - 'requests >= 2.2.1', + 'requests >= 2.2.1, < 2.5.0', 'six >= 1.3.0', ] |
