summaryrefslogtreecommitdiff
path: root/Lib/json
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-02-21 00:33:36 +0100
committerGeorg Brandl <georg@python.org>2012-02-21 00:33:36 +0100
commit298a4092f0c1d5ad095ef73844dbc490dc022420 (patch)
tree596b4e3da08ae38d105873325a507aacec4c3b53 /Lib/json
parent0d54f65446ba3787860e2b70d3edc8b0a5c7a4e5 (diff)
parent1b4bc18634225641f4d2890e989d807afd145b59 (diff)
downloadcpython-298a4092f0c1d5ad095ef73844dbc490dc022420.tar.gz
Merge 3.2: Issue #13703 plus some related test suite fixes.
Diffstat (limited to 'Lib/json')
-rw-r--r--Lib/json/decoder.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/json/decoder.py b/Lib/json/decoder.py
index 3174e31315..e7c0539b86 100644
--- a/Lib/json/decoder.py
+++ b/Lib/json/decoder.py
@@ -121,8 +121,7 @@ def py_scanstring(s, end, strict=True,
msg = "Invalid \\uXXXX escape"
raise ValueError(errmsg(msg, s, end))
uni = int(esc, 16)
- # Check for surrogate pair on UCS-4 systems
- if 0xd800 <= uni <= 0xdbff and sys.maxunicode > 65535:
+ if 0xd800 <= uni <= 0xdbff:
msg = "Invalid \\uXXXX\\uXXXX surrogate pair"
if not s[end + 5:end + 7] == '\\u':
raise ValueError(errmsg(msg, s, end))