from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
from .packages.urllib3.response import HTTPResponse
from .packages.urllib3.util import Timeout as TimeoutSauce
-from .compat import urlparse, basestring, urldefrag, unquote, urlunparse
+from .compat import urlparse, basestring, urldefrag, unquote
from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,
except_on_missing_scheme, get_auth_from_url)
from .structures import CaseInsensitiveDict
else:
# Only scheme should be lower case
parsed = urlparse(url)
- parsed = (parsed.scheme, parsed.netloc, parsed.path,
- parsed.params, parsed.query, parsed.fragment)
- url = urlunparse(parsed)
+ url = parsed.geturl()
conn = self.poolmanager.connection_from_url(url)
return conn
from collections import Mapping
from datetime import datetime
-from .compat import cookielib, OrderedDict, urljoin, urlparse, urlunparse, builtin_str
+from .compat import cookielib, OrderedDict, urljoin, urlparse, builtin_str
from .cookies import cookiejar_from_dict, extract_cookies_to_jar, RequestsCookieJar
from .models import Request, PreparedRequest
from .hooks import default_hooks, dispatch_hook
# The scheme should be lower case...
parsed = urlparse(url)
- parsed = (parsed.scheme, parsed.netloc, parsed.path,
- parsed.params, parsed.query, parsed.fragment)
- url = urlunparse(parsed)
+ url = parsed.geturl()
# Facilitate non-RFC2616-compliant 'location' headers
# (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource')