This commit is contained in:
Kenneth Reitz
2012-07-08 00:24:24 -04:00
parent 3347146a44
commit f8c98715c3
2 changed files with 5 additions and 6 deletions
+4
View File
@@ -72,6 +72,10 @@ is_osx = ('darwin' in str(sys.platform).lower())
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
+1 -6
View File
@@ -10,11 +10,6 @@ This module contains the primary objects that power Requests.
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
@@ -36,7 +31,7 @@ from .utils import (
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