Dear all,
In moving to Cython 0.17 (Sage 5.1 to 5.2) some of our code broke due to changed handling of "cdef inline" methods. I made a small example here:
http://www.math.princeton.edu/~svanzwam/cytest.tar.gzThe relevant code is the following:
# foo/B.pyx
cdef class B:
cdef inline int makedo(self):
return 2
cpdef work(self, n):
return n + self.makedo()
# foo/A.pyx
cdef class A(B):
cdef inline int makedo(self):
return 5
Running this from sage 5.1 we get:
sage: import foo.A
sage: import foo.B
sage: a = foo.A.A()
sage: b = foo.B.B()
sage:
b.work(1)
3
sage:
a.work(1)
6
Running the same code from sage 5.2.rc0 we get:
sage: import foo.A
sage: import foo.B
sage: a = foo.A.A()
sage: b = foo.B.B()
sage:
b.work(1)
3
sage:
a.work(1)
3
So in Cython 0.17, the class A calls B's makedo(), rather than its own makedo(). I think this is a bug.
Regards,
Stefan.