Author: Manuel Jacob <m...@manueljacob.de>
Branch: py3.3
Changeset: r78498:1c0541a5be95
Date: 2015-07-08 16:50 +0200
http://bitbucket.org/pypy/pypy/changeset/1c0541a5be95/

Log:    Fix __qualname__ of built-in class methods.

diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -2,7 +2,7 @@
 from pypy.interpreter.baseobjspace import W_Root, SpaceCache
 from pypy.interpreter.error import oefmt, OperationError
 from pypy.interpreter.function import (
-    Function, StaticMethod, FunctionWithFixedCode)
+    Function, StaticMethod, ClassMethod, FunctionWithFixedCode)
 from pypy.interpreter.typedef import weakref_descr, GetSetProperty,\
      descr_get_dict, dict_descr, Member, TypeDef
 from pypy.interpreter.astcompiler.misc import mangle
@@ -1313,10 +1313,12 @@
             # Set the __qualname__ of member functions
             for name in rawdict:
                 w_obj = dict_w[name]
+                if isinstance(w_obj, ClassMethod):
+                    w_obj = w_obj.w_function
                 if isinstance(w_obj, FunctionWithFixedCode):
                     qualname = w_type.getqualname(space) + '.' + name
                     w_obj.fset_func_qualname(space, space.wrap(qualname))
-                
+
         if hasattr(typedef, 'flag_sequence_bug_compat'):
             w_type.flag_sequence_bug_compat = typedef.flag_sequence_bug_compat
         w_type.lazyloaders = lazyloaders
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to