[pypy-commit] pypy py3k: more appropriate name

pjenvey noreply at buildbot.pypy.org
Mon Apr 22 01:50:10 CEST 2013


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r63542:af59d23bb99a
Date: 2013-04-21 16:46 -0700
http://bitbucket.org/pypy/pypy/changeset/af59d23bb99a/

Log:	more appropriate name

diff --git a/pypy/interpreter/unicodehelper.py b/pypy/interpreter/unicodehelper.py
--- a/pypy/interpreter/unicodehelper.py
+++ b/pypy/interpreter/unicodehelper.py
@@ -53,9 +53,9 @@
         # Python we cannot use it before the codecs are ready. use the
         # locale codec instead
         from pypy.module._codecs.locale import (
-            unicode_decode_locale_surrogateescape)
+            str_decode_locale_surrogateescape)
         bytes = space.bytes_w(w_string)
-        uni = unicode_decode_locale_surrogateescape(
+        uni = str_decode_locale_surrogateescape(
             bytes, errorhandler=decode_error_handler(space))
     else:
         from pypy.module.sys.interp_encoding import getfilesystemencoding
diff --git a/pypy/module/_codecs/locale.py b/pypy/module/_codecs/locale.py
--- a/pypy/module/_codecs/locale.py
+++ b/pypy/module/_codecs/locale.py
@@ -70,7 +70,7 @@
             pypy_wchar2char_free(sbuf)
 
 
-def unicode_decode_locale_surrogateescape(s, errorhandler=None):
+def str_decode_locale_surrogateescape(s, errorhandler=None):
     """Decode strs via the locale codecs (POSIX mrbtowc) with the
     surrogateescape handler.
 
diff --git a/pypy/module/_codecs/test/test_locale.py b/pypy/module/_codecs/test/test_locale.py
--- a/pypy/module/_codecs/test/test_locale.py
+++ b/pypy/module/_codecs/test/test_locale.py
@@ -2,7 +2,7 @@
 import py
 from pypy.module._codecs import interp_codecs
 from pypy.module._codecs.locale import (
-    unicode_decode_locale_surrogateescape,
+    str_decode_locale_surrogateescape,
     unicode_encode_locale_surrogateescape)
 from rpython.rlib import rlocale, runicode
 
@@ -54,7 +54,7 @@
 
     def test_decode_locale(self):
         self.setlocale("en_US.UTF-8")
-        locale_decoder = unicode_decode_locale_surrogateescape
+        locale_decoder = str_decode_locale_surrogateescape
         utf8_decoder = self.getdecoder('utf-8')
         for val in 'foo', ' \xe6\x97\xa5\xe6\x9c\xac', '\xf0\x93\x88\x8c':
             assert (locale_decoder(val) ==
@@ -62,7 +62,7 @@
 
     def test_decode_locale_errorhandler(self):
         self.setlocale("en_US.UTF-8")
-        locale_decoder = unicode_decode_locale_surrogateescape
+        locale_decoder = str_decode_locale_surrogateescape
         utf8_decoder = self.getdecoder('utf-8')
         decode_error_handler = self.getstate().decode_error_handler
         val = 'foo\xe3bar'


More information about the pypy-commit mailing list