Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r62897:b6cdff153a38
Date: 2013-03-30 12:29 -0700
http://bitbucket.org/pypy/pypy/changeset/b6cdff153a38/

Log:    move these into baseobjspace to avoid obscure test_ztranslation
        failures

diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -1377,6 +1377,14 @@
         """
         return w_obj.identifier_w(self)
 
+    def fsencode(space, w_obj):
+        from pypy.interpreter.unicodehelper import PyUnicode_EncodeFSDefault
+        return PyUnicode_EncodeFSDefault(space, w_obj)
+
+    def fsdecode(space, w_obj):
+        from pypy.interpreter.unicodehelper import PyUnicode_DecodeFSDefault
+        return PyUnicode_DecodeFSDefault(space, w_obj)
+
     def fsencode_w(self, w_obj):
         if self.isinstance_w(w_obj, self.w_unicode):
             w_obj = self.fsencode(w_obj)
diff --git a/pypy/objspace/descroperation.py b/pypy/objspace/descroperation.py
--- a/pypy/objspace/descroperation.py
+++ b/pypy/objspace/descroperation.py
@@ -514,14 +514,6 @@
                 "'%s' does not support the buffer interface", typename)
         return space.get_and_call_function(w_impl, w_obj)
 
-    def fsencode(space, w_obj):
-        from pypy.interpreter.unicodehelper import PyUnicode_EncodeFSDefault
-        return PyUnicode_EncodeFSDefault(space, w_obj)
-
-    def fsdecode(space, w_obj):
-        from pypy.interpreter.unicodehelper import PyUnicode_DecodeFSDefault
-        return PyUnicode_DecodeFSDefault(space, w_obj)
-
 
 # helpers
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to