Maciej Fijalkowski  committed d544c05

(arigo, fijal) support static methods for mixins

  • Participants
  • Parent commits aed59d1
  • Branches numpy-reintroduce-zjit-tests

Comments (0)

Files changed (1)

File pypy/annotation/

 from pypy.interpreter.pycode import cpython_code_signature
 from pypy.interpreter.argument import rawshape
 from pypy.interpreter.argument import ArgErr
-from pypy.tool.sourcetools import valid_identifier
+from pypy.tool.sourcetools import valid_identifier, func_with_new_name
 from pypy.tool.pairtype import extendabletype
 class CallFamily(object):
             # is of type FunctionType.  But bookkeeper.immutablevalue()
             # will do the right thing in s_get_value().
+        if isinstance(value, staticmethod) and mixin:
+            value = staticmethod(func_with_new_name(value.__func__,
+                                                    value.__func__.__name__))
         if type(value) in MemberDescriptorTypes:
             # skip __slots__, showing up in the class as 'member' objects