diff options
author | SVN-Git Migration <python-modules-team@lists.alioth.debian.org> | 2015-10-08 13:41:34 -0700 |
---|---|---|
committer | SVN-Git Migration <python-modules-team@lists.alioth.debian.org> | 2015-10-08 13:41:34 -0700 |
commit | 2c79b40c98c83e352c5479223d581d69b0e7806c (patch) | |
tree | 81c85525061fbc4805ff2ec2280f560956c35d64 /requests/compat.py | |
parent | d075cc8a1294c77c994dc5fd220ecb163ed31b93 (diff) | |
download | python-requests-2c79b40c98c83e352c5479223d581d69b0e7806c.tar python-requests-2c79b40c98c83e352c5479223d581d69b0e7806c.tar.gz |
Imported Upstream version 2.4.3
Diffstat (limited to 'requests/compat.py')
-rw-r--r-- | requests/compat.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/requests/compat.py b/requests/compat.py index bdf10d6..be5a1ed 100644 --- a/requests/compat.py +++ b/requests/compat.py @@ -75,7 +75,9 @@ is_solaris = ('solar==' in str(sys.platform).lower()) # Complete guess. try: import simplejson as json -except ImportError: +except (ImportError, SyntaxError): + # simplejson does not support Python 3.2, it thows a SyntaxError + # because of u'...' Unicode literals. import json # --------- @@ -90,7 +92,6 @@ if is_py2: from Cookie import Morsel from StringIO import StringIO from .packages.urllib3.packages.ordered_dict import OrderedDict - from httplib import IncompleteRead builtin_str = str bytes = str @@ -106,7 +107,6 @@ elif is_py3: from http.cookies import Morsel from io import StringIO from collections import OrderedDict - from http.client import IncompleteRead builtin_str = str str = str |