Author: Philip Jenvey <[email protected]>
Branch: stdlib-2.7.8
Changeset: r72983:34f22247550e
Date: 2014-08-22 17:14 -0700
http://bitbucket.org/pypy/pypy/changeset/34f22247550e/

Log:    adapt to 2.7 from 3.3

diff --git a/pypy/interpreter/nestedscope.py b/pypy/interpreter/nestedscope.py
--- a/pypy/interpreter/nestedscope.py
+++ b/pypy/interpreter/nestedscope.py
@@ -72,7 +72,7 @@
             content = "%s object at 0x%s" % (space.type(self.w_value).name,
                                              self.w_value.getaddrstring(space))
         s = "<cell at 0x%s: %s>" % (self.getaddrstring(space), content)
-        return space.wrap(s.decode('utf-8'))
+        return space.wrap(s)
 
     def descr__cell_contents(self, space):
         try:
diff --git a/pypy/interpreter/test/test_nestedscope.py 
b/pypy/interpreter/test/test_nestedscope.py
--- a/pypy/interpreter/test/test_nestedscope.py
+++ b/pypy/interpreter/test/test_nestedscope.py
@@ -62,7 +62,7 @@
 
     def test_cell_repr(self):
         import re
-        from reprlib import repr as r # Don't shadow builtin repr
+        from repr import repr as r # Don't shadow builtin repr
 
         def get_cell():
             x = 42
@@ -71,7 +71,7 @@
             return inner
         x = get_cell().__closure__[0]
         assert re.match(r'<cell at 0x[0-9A-Fa-f]+: int object at 
0x[0-9A-Fa-f]+>', repr(x))
-        assert re.match(r'<cell at 0x.*\.\.\..*>', r(x))
+        assert re.match(r'<cell at.*\.\.\..*>', r(x))
 
         def get_cell():
             if False:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to