[issue11489] json.dumps not parsable by json.loads (on Linux only)

Arfrever Frehtes Taifersar Arahesis report at bugs.python.org
Sun Dec 1 06:13:44 CET 2013


Arfrever Frehtes Taifersar Arahesis added the comment:

New tests fail on 2.7 branch, at least with Python configured with --enable-unicode=ucs4 (which is default in Gentoo):

======================================================================
FAIL: test_surrogates (json.tests.test_scanstring.TestCScanstring)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-2.7.7_pre20131201/work/python-2.7.7_pre20131201/Lib/json/tests/test_scanstring.py", line 107, in test_surrogates
    assertScan(u'"z\\ud834\udd20x12345"', u'z\ud834\udd20x12345')
  File "/var/tmp/portage/dev-lang/python-2.7.7_pre20131201/work/python-2.7.7_pre20131201/Lib/json/tests/test_scanstring.py", line 97, in assertScan
    (expect, len(given)))
AssertionError: Tuples differ: (u'z\ud834\udd20x12345', 16) != (u'z\U0001d120x12345', 16)

First differing element 0:
z\ud834\udd20x12345
z\U0001d120x12345

- (u'z\ud834\udd20x12345', 16)
+ (u'z\U0001d120x12345', 16)

======================================================================
FAIL: test_surrogates (json.tests.test_scanstring.TestPyScanstring)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-2.7.7_pre20131201/work/python-2.7.7_pre20131201/Lib/json/tests/test_scanstring.py", line 107, in test_surrogates
    assertScan(u'"z\\ud834\udd20x12345"', u'z\ud834\udd20x12345')
  File "/var/tmp/portage/dev-lang/python-2.7.7_pre20131201/work/python-2.7.7_pre20131201/Lib/json/tests/test_scanstring.py", line 97, in assertScan
    (expect, len(given)))
AssertionError: Tuples differ: (u'z\ud834\udd20x12345', 16) != (u'z\U0001d120x12345', 16)

First differing element 0:
z\ud834\udd20x12345
z\U0001d120x12345

- (u'z\ud834\udd20x12345', 16)
+ (u'z\U0001d120x12345', 16)

----------------------------------------------------------------------

----------
nosy: +Arfrever
resolution: fixed -> 
stage: committed/rejected -> 
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11489>
_______________________________________


More information about the Python-bugs-list mailing list