I think a lot of you may have run into similar issues with transitioning from Cython 0.* to 3.0, so I'm asking here as well. As a reference, I've also asked it on cython-users:
but perhaps a sage-specific perspective from here may help.
In the RiemannTheta package the instruction
mpfr_init2(self.r1, self.RR.__prec)
used to work just fine but now gets the error:
AttributeError: 'sage.rings.real_mpfr.RealField_class' object has no attribute '_RiemannTheta__prec'
(where RR is, as you can see, a sage RealField). I suspect there are two things in the way of this functioning:
* the name now gets mangled by prefixing "_RiemannTheta"
* the actual name of the attribute may get mangled as well; presumably to "_RealField_class__prec".
This must have come up in other libraries as well. How did you deal with that? Can we turn off mangling?
It seems to me cython might be a little too eager to mangle here. I don't think double-underscore prefixed names get mangled in python, do they?