import socket
from .models import Response
-from .packages.urllib3.poolmanager import PoolManager, ProxyManager
+from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
from .packages.urllib3.response import HTTPResponse
from .compat import urlparse, basestring, urldefrag, unquote
from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,
if proxy:
except_on_missing_scheme(proxy)
- conn = ProxyManager(self.poolmanager.connection_from_url(proxy))
+ conn = proxy_from_url(proxy).connection_from_url(url)
else:
conn = self.poolmanager.connection_from_url(url.lower())