Skip to content

Commit 9e295d6

Browse files
committed
urllib3/requests issues
1 parent 1f8cde8 commit 9e295d6

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docker/ssladapter/ssladapter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
from distutils.version import StrictVersion
66
from requests.adapters import HTTPAdapter
77
import ssl
8+
89
try:
9-
import urllib3
10-
except ImportError:
1110
import requests.packages.urllib3 as urllib3
12-
11+
except ImportError:
12+
import urllib3
1313

1414
PoolManager = urllib3.poolmanager.PoolManager
1515

docker/unixconn/unixconn.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
import socket
2222

2323
try:
24-
import urllib3
25-
except ImportError:
2624
import requests.packages.urllib3 as urllib3
25+
except ImportError:
26+
import urllib3
2727

2828

2929
class UnixHTTPConnection(httplib.HTTPConnection, object):
@@ -77,9 +77,9 @@ def get_connection(self, socket_path, proxies=None):
7777
if pool:
7878
return pool
7979

80-
pool = UnixHTTPConnectionPool(self.base_url,
81-
socket_path,
82-
self.timeout)
80+
pool = UnixHTTPConnectionPool(
81+
self.base_url, socket_path, self.timeout
82+
)
8383
self.pools[socket_path] = pool
8484

8585
return pool

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
SOURCE_DIR = os.path.join(ROOT_DIR)
88

99
requirements = [
10-
'requests >= 2.2.1',
10+
'requests >= 2.2.1, < 2.5.0',
1111
'six >= 1.3.0',
1212
]
1313

0 commit comments

Comments
 (0)