[Interface-dev] Twisted switch progress report

Martijn Faassen faassen at infrae.com
Mon May 10 13:55:01 EDT 2004


Jim Fulton wrote:
> Itamar Shtull-Trauring wrote:

>>
>> 3. Currently implements is indicated like this:
>>
>> class Bar:
>>    __implements__ = IFoo, IBar
>>
>> I have some code in adapter registration backwards compat layer that
>> converts this to the correct way. The problem is with subclasses:
>>
>> class Sub(Bar):
>>    __implements__ = Bar.__implements__ + (ISub,)
>>
>> If Bar changes to implements(), Sub will break. In the interest of
>> backwards compat, could I change the implements() class' __add__ and
>> __radd__ to handle tuples and interface objects? With a deprecation
>> warning of course.

Does this affect my changes on zope.interface at all? I renamed 
__implements__ to __implemented__ as it's an implementation detail, to 
avoid clashes with Zope 2.

I'm also thinking about ripping out the backwards compatibility code 
which deals with public __implemented__ out.

Or is your backwards compatibility code independent from the stuff in 
zope.interface?

Regards,

Martijn




More information about the Interface-dev mailing list