is_hpux = ('hpux' in str(sys.platform).lower()) # Complete guess.
is_solaris = ('solar==' in str(sys.platform).lower()) # Complete guess.
+try:
+ import simplejson as json
+except ImportError:
+ import json
# ---------
# Specifics
import os
from datetime import datetime
-try:
- import simplejson as json
-except ImportError:
- import json
-
from .hooks import dispatch_hook, HOOKS
from .structures import CaseInsensitiveDict
from .status_codes import codes
DEFAULT_CA_BUNDLE_PATH)
from .compat import (
cookielib, urlparse, urlunparse, urljoin, urlsplit, urlencode, str, bytes,
- StringIO, is_py2, chardet)
+ StringIO, is_py2, chardet, json)
REDIRECT_STATI = (codes.moved, codes.found, codes.other, codes.temporary_moved)
CONTENT_CHUNK_SIZE = 10 * 1024