Stefan Behnel, 15.08.2010 14:06:
> Stefan Behnel, 13.08.2010 15:19:
>> Robert Bradshaw, 27.07.2010 21:43:
>>> On Tue, Jul 27, 2010 at 12:33 PM, Carl Witty wrote:
>>>> On Tue, Jul 27, 2010 at 2:07 AM, Robert Bradshaw wrote:
>>>>> Very, very cool. I've actually been thinking a lot about this myself
>>>>> (given the recent thread in sage-devel). I think one reason we did our
>>>>> own wrappers was for introspection/docstrings--does that break? Did
>>>>> you fix the most egregious __getattr__?
>>>>
>>>> Yes, this does break docstrings on these functions.  I think this
>>>> could be fixed; for instance, by creating our own statically-declared
>>>> wrapperbase/slotdef structs that have the right docstring, and
>>>> creating our own wrapper objects using these structs.  I could try to
>>>> work on this, but probably not soon enough for 0.13.
>>>
>>> Well, for special methods, I consider this kind of performance
>>> degradation to be a more important issue than introspection.
>>
>> I just compiled lxml with the current cython-devel and the resulting module
>> failed during initialisation when it tried to retrieve the docstring for a
>> "__getattr__" method when building the automatically generated __test__
>> dict. Seeing that I used this, I'm pretty sure others did, too. So we will
>> clearly break user code with this change.
>>
>> So, I'm -1 on applying the change for 0.13 without keeping the
>> functionality compatible with what we had before. This is a pure
>> optimisation, so it must not break code.
>
> I saw that Robert worked on this but ISTM that __getattr__ is more special
> than other special methods in some way. I still get the above error. I
> pushed an update to the related test to make it fail.

Ah, got it. This is just what Carl wrote in the initial bug report. The new 
setup fails to provide a __getattr__ method and implements a 
__getattribute__ method instead. But the problem is not only that the 
introspection says it's not there, the problem is that the method really is 
not there. So we break user code that tries to use __getattr__ as an 
unbound method *and* the code generated by Cython for setting and 
retrieving docstrings of this method, thus breaking the module 
initialisation. So it's a double regression that is clearly user visible.

Sounds like a release blocker to me.

Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to