Author: Ronan Lamy <ronan.l...@gmail.com>
Branch: multiphase
Changeset: r92139:3ddef501ba8e
Date: 2017-08-13 00:02 +0200
http://bitbucket.org/pypy/pypy/changeset/3ddef501ba8e/

Log:    hg merge py3.5

diff --git a/pypy/interpreter/function.py b/pypy/interpreter/function.py
--- a/pypy/interpreter/function.py
+++ b/pypy/interpreter/function.py
@@ -598,7 +598,7 @@
         else:
             w_builtins = space.getbuiltinmodule('builtins')
             new_inst = space.getattr(w_builtins, space.newtext('getattr'))
-            tup = [w_instance, space.newtext(self.w_function.name)]
+            tup = [w_instance, space.newunicode(w_function.getname(space))]
         return space.newtuple([new_inst, space.newtuple(tup)])
 
 
diff --git a/pypy/module/cpyext/methodobject.py 
b/pypy/module/cpyext/methodobject.py
--- a/pypy/module/cpyext/methodobject.py
+++ b/pypy/module/cpyext/methodobject.py
@@ -46,7 +46,7 @@
 class W_PyCFunctionObject(W_Root):
     def __init__(self, space, ml, w_self, w_module=None):
         self.ml = ml
-        self.name = rffi.charp2str(rffi.cast(rffi.CCHARP,self.ml.c_ml_name))
+        self.name = rffi.charp2str(rffi.cast(rffi.CCHARP, self.ml.c_ml_name))
         self.w_self = w_self
         self.w_module = w_module
 
@@ -205,8 +205,8 @@
     args_w, kw_w = __args__.unpack()
     if len(args_w) < 1:
         raise oefmt(space.w_TypeError,
-            "descriptor '%s' of '%s' object needs an argument",
-            self.name, self.w_objclass.getname(space))
+            "descriptor '%8' of '%N' object needs an argument",
+            self.name, self.w_objclass)
     w_instance = args_w[0] # XXX typecheck missing
     w_args = space.newtuple(args_w[1:])
     w_kw = space.newdict()
@@ -328,8 +328,8 @@
             if not method.c_ml_name:
                 break
             if name == "__methods__":
-                method_list_w.append(
-                    space.newtext(rffi.charp2str(rffi.cast(rffi.CCHARP, 
method.c_ml_name))))
+                method_list_w.append(space.newtext(rffi.charp2str(
+                    rffi.cast(rffi.CCHARP, method.c_ml_name))))
             elif rffi.charp2str(rffi.cast(rffi.CCHARP, method.c_ml_name)) == 
name: # XXX expensive copy
                 return W_PyCFunctionObject(space, method, w_obj)
     if name == "__methods__":
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to