# -*- coding: utf-8 -*-
requests.compat ~~~~~~~~~~~~~~~
This module handles import compatibility issues between Python 2 and Python 3. """
# ------- # Pythons # -------
# Syntax sugar.
#: Python 2.x?
#: Python 3.x?
# --------- # Specifics # ---------
from urllib import ( quote, unquote, quote_plus, unquote_plus, urlencode, getproxies, proxy_bypass, proxy_bypass_environment, getproxies_environment) from urlparse import urlparse, urlunparse, urljoin, urlsplit, urldefrag from urllib2 import parse_http_list import cookielib from Cookie import Morsel from StringIO import StringIO # Keep OrderedDict for backwards compatibility. from collections import Callable, Mapping, MutableMapping, OrderedDict
builtin_str = str bytes = str str = unicode basestring = basestring numeric_types = (int, long, float) integer_types = (int, long)
# Keep OrderedDict for backwards compatibility.
|