Re: [zope.interface bug] Re: [Zope-dev] "zope.interface" confuses Python

2008-01-10 Thread Jim Fulton
On Jan 10, 2008, at 12:44 PM, Dieter Maurer wrote: Jim Fulton wrote at 2008-1-7 16:04 -0500: ... "inspect.getmembers" and "inspect.classify_class_attrs" require that for each "name" in "dir(cls)" "getattr(cls, name)" does not raise an exception. This fails for classes magically stuffed wi

Re: [zope.interface bug] Re: [Zope-dev] "zope.interface" confuses Python

2008-01-10 Thread Dieter Maurer
Jim Fulton wrote at 2008-1-7 16:04 -0500: > ... >> "inspect.getmembers" and "inspect.classify_class_attrs" >> require that for each "name" in "dir(cls)" "getattr(cls, name)" >> does not raise an exception. >> >> This fails for classes magically stuffed with a "__provides__" >> descriptor. > >

Re: [zope.interface bug] Re: [Zope-dev] "zope.interface" confuses Python

2008-01-08 Thread Dieter Maurer
Jim Fulton wrote at 2008-1-7 16:04 -0500: >... >> If "__implements__" is inherited, why is "__provides__" not >> inherited? > >__provides__ (in this context) is a class attribute. I don't support >(and don't want to support) inheritance between class objects. Where can I read about the "__provi

Re: [zope.interface bug] Re: [Zope-dev] "zope.interface" confuses Python

2008-01-07 Thread Jim Fulton
On Jan 7, 2008, at 3:54 PM, Dieter Maurer wrote: ... Under some circumstances "zope.interface" adds a "__provides__" descriptor to a class. The descriptor is implemented in "zope/interface/_zope_interface_coptimizations.c" and called "CPB_descr_get". While "__implements__" is inherited by deri

Re: [zope.interface bug] Re: [Zope-dev] "zope.interface" confuses Python

2008-01-07 Thread Dieter Maurer
Hello Jim, Jim Fulton wrote at 2008-1-7 15:15 -0500: > >> I think I understand the behavior -- and I think it is a >> "zope.interface" >> bug. > >No, it is intended behavior. Why? > ... >> Under some circumstances "zope.interface" adds a "__provides__" >> descriptor >> to a class. The d

Re: [zope.interface bug] Re: [Zope-dev] "zope.interface" confuses Python

2008-01-07 Thread Jim Fulton
On Jan 7, 2008, at 2:35 PM, Dieter Maurer wrote: Dieter Maurer wrote at 2008-1-7 17:55 +0100: Yesterday, I released "dm.zdoc" and today I find problems. The analysis revealed: The class "webdav.EtagSupport.EtagSupport" has initially no attributes "__provides__" and "__providedBy__". For sti

[zope.interface bug] Re: [Zope-dev] "zope.interface" confuses Python

2008-01-07 Thread Dieter Maurer
Dieter Maurer wrote at 2008-1-7 17:55 +0100: >Yesterday, I released "dm.zdoc" and today I find problems. > >The analysis revealed: > > The class "webdav.EtagSupport.EtagSupport" has initially no > attributes "__provides__" and "__providedBy__". > > For still unknown reasons, it suddenly gets the

[Zope-dev] "zope.interface" confuses Python

2008-01-07 Thread Dieter Maurer
Yesterday, I released "dm.zdoc" and today I find problems. The analysis revealed: The class "webdav.EtagSupport.EtagSupport" has initially no attributes "__provides__" and "__providedBy__". For still unknown reasons, it suddenly gets these attributes. "__provides__" is a "zope.interface.