[pypy-commit] pypy default: Add an XXX about .decode('utf-8') in RPython

arigo pypy.commits at gmail.com
Sun Jan 8 09:57:08 EST 2017


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r89412:b144076bf8d4
Date: 2017-01-08 15:54 +0100
http://bitbucket.org/pypy/pypy/changeset/b144076bf8d4/

Log:	Add an XXX about .decode('utf-8') in RPython

diff --git a/rpython/rtyper/rstr.py b/rpython/rtyper/rstr.py
--- a/rpython/rtyper/rstr.py
+++ b/rpython/rtyper/rstr.py
@@ -33,6 +33,10 @@
             value, len(value), 'strict', final=True,
             errorhandler=self.ll_raise_unicode_exception_decode,
             allow_surrogates=False, result=result)
+        # XXX should it really be 'allow_surrogates=False'?  In RPython,
+        # unicode.decode('utf-8') happily accepts surrogates.  This
+        # makes it hard to test untranslated (it's the cause of a
+        # failure in lib-python's test_warnings on PyPy3, for example)
         return self.ll.llunicode(result.build())
 
     @staticmethod


More information about the pypy-commit mailing list