if is_py2:
- from urlparse import urlparse, urlunparse, urljoin, urlsplit, quote, unquote
+ from urllib import quote, unquote
+ from urlparse import urlparse, urlunparse, urljoin, urlsplit
from urllib2 import parse_http_list
import cookielib
+ from .packages.oreos.monkeys import SimpleCookie
elif is_py3:
from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote
from urllib.request import parse_http_list
from http import cookiejar as cookielib
+ from http.cookies import SimpleCookie
"""
import os
-import urllib.request, urllib.parse, urllib.error
-
-# from urlparse import urlparse, urlunparse, urljoin, urlsplit
-from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode
from datetime import datetime
from .hooks import dispatch_hook, HOOKS
from .structures import CaseInsensitiveDict
from .status_codes import codes
-# from .packages import oreos
+
from .auth import HTTPBasicAuth, HTTPProxyAuth
from .packages.urllib3.response import HTTPResponse
from .packages.urllib3.exceptions import MaxRetryError
get_encoding_from_headers, stream_decode_response_unicode,
stream_decompress, guess_filename, requote_path, dict_from_string)
+from .compat import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote
+
# Import chardet if it is available.
try:
import chardet
if not path:
path = '/'
- from urllib.parse import quote, unquote
-
path = quote(path.encode('utf-8'))
url.append(path)