Describe the bug
Overriding a static method in a child class causes an infinite loop in generate_wrapper_functions, where entry.prev_entry == entry.
This issue only exists with 3.1/master and the C++ backend. Not reproducible on 3.0 or the 3.1 with the C backend.
Code to reproduce the behaviour:
Cherry-pick this commit: pilleye@dbeb85b
This issue only exists on 3.1/master with the C++ backend:
python runtests.py -3 --backends cpp -vv static_method_inheritance
Minimal repro:
cdef class Foo:
@staticmethod
cdef Foo meth(Foo this):
return Foo()
cdef class OtherFoo(Foo):
@staticmethod
cdef OtherFoo meth(Foo this):
return OtherFoo()
Expected behaviour
Should either not infinite loop or have validation against unexpected inputs.
OS
Reproducible on Linux and Mac, don't have access to a Windows machine.
Python version
3.12 and 3.13
Cython version
3.1/master
Additional context
No response