[pypy-commit] pypy py3k: Also fix ropeunicodeobject.

amauryfa noreply at buildbot.pypy.org
Mon Sep 24 23:47:03 CEST 2012


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r57534:809b97e80551
Date: 2012-09-23 22:58 +0200
http://bitbucket.org/pypy/pypy/changeset/809b97e80551/

Log:	Also fix ropeunicodeobject.

diff --git a/pypy/objspace/std/ropeunicodeobject.py b/pypy/objspace/std/ropeunicodeobject.py
--- a/pypy/objspace/std/ropeunicodeobject.py
+++ b/pypy/objspace/std/ropeunicodeobject.py
@@ -9,7 +9,7 @@
 from pypy.objspace.std.noneobject import W_NoneObject
 from pypy.rlib import rope
 from pypy.rlib.rstring import StringBuilder
-from pypy.rlib.runicode import unicode_encode_unicode_escape
+from pypy.rlib.runicode import unicode_escape_nonprintable
 from pypy.objspace.std.sliceobject import W_SliceObject, normalize_simple_slice
 from pypy.objspace.std import unicodeobject, slicetype, iterobject
 from pypy.objspace.std.tupleobject import W_TupleObject
@@ -813,7 +813,7 @@
     node = w_unicode._node
     chars = node.flatten_unicode()
     size = node.length()
-    s = unicode_encode_unicode_escape(chars, size, "strict", quotes=True)
+    s = unicode_escape_nonprintable(chars, size, "strict", quotes=True)
     return space.wrap(s)
 
 def mod__RopeUnicode_ANY(space, w_format, w_values):
diff --git a/pypy/objspace/std/unicodeobject.py b/pypy/objspace/std/unicodeobject.py
--- a/pypy/objspace/std/unicodeobject.py
+++ b/pypy/objspace/std/unicodeobject.py
@@ -12,8 +12,7 @@
 from pypy.rlib.objectmodel import compute_hash, specialize
 from pypy.rlib.objectmodel import compute_unique_id
 from pypy.rlib.rstring import UnicodeBuilder
-from pypy.rlib.runicode import (
-    unicode_encode_unicode_escape, unicode_escape_nonprintable)
+from pypy.rlib.runicode import unicode_escape_nonprintable
 from pypy.module.unicodedata import unicodedb
 from pypy.tool.sourcetools import func_with_new_name
 from pypy.rlib import jit


More information about the pypy-commit mailing list