[pypy-commit] pypy py3.5: hg merge default

arigo pypy.commits at gmail.com
Tue Feb 21 04:25:25 EST 2017


Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r90244:c91068b7e4ea
Date: 2017-02-21 09:24 +0000
http://bitbucket.org/pypy/pypy/changeset/c91068b7e4ea/

Log:	hg merge default

diff --git a/rpython/annotator/unaryop.py b/rpython/annotator/unaryop.py
--- a/rpython/annotator/unaryop.py
+++ b/rpython/annotator/unaryop.py
@@ -704,7 +704,8 @@
             s_func = bookkeeper.immutablevalue(
                              runicode.unicode_encode_utf_8_elidable)
             s_errors = bookkeeper.immutablevalue('strict')
-            s_errorhandler = bookkeeper.immutablevalue(None)
+            s_errorhandler = bookkeeper.immutablevalue(
+                                    runicode.default_unicode_error_encode)
             s_allow_surr = bookkeeper.immutablevalue(True)
             args = [self, self.len(), s_errors, s_errorhandler, s_allow_surr]
             bookkeeper.emulate_pbc_call(bookkeeper.position_key, s_func, args)
diff --git a/rpython/rtyper/rstr.py b/rpython/rtyper/rstr.py
--- a/rpython/rtyper/rstr.py
+++ b/rpython/rtyper/rstr.py
@@ -383,9 +383,10 @@
         from rpython.rlib import runicode
         s = hlunicode(ll_s)
         assert s is not None
+        errorhandler = runicode.default_unicode_error_encode
         # NB. keep the arguments in sync with annotator/unaryop.py
         bytes = runicode.unicode_encode_utf_8_elidable(
-            s, len(s), 'strict', None, True)
+            s, len(s), 'strict', errorhandler, True)
         return self.ll.llstr(bytes)
 
     def rtype_method_encode(self, hop):


More information about the pypy-commit mailing list