urllib3/requests issues

This commit is contained in:
Joffrey F 2015-01-09 15:24:22 -08:00
parent 1f8cde8560
commit 9e295d666a
3 changed files with 10 additions and 10 deletions

View File

@ -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
try:
import requests.packages.urllib3 as urllib3
except ImportError:
import urllib3
PoolManager = urllib3.poolmanager.PoolManager

View File

@ -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

View File

@ -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',
]