[Interface-dev] Twisted switch progress report
Jim Fulton
jim at zope.com
Mon May 10 13:14:22 EDT 2004
Itamar Shtull-Trauring wrote:
> Looks like we can switch to zope.interface in Twisted once we get past
> v1.3 release this week.
>
> 1. We will use zope.components' registry adapter if it's available,
> otherwise create our own (transparent to users, of course) so there's
> always only one global registry.
>
> 2. We will install zope.interface ourselves, using Fred Drake's
> distutils infrastructure probably (assuming you use tarball. Debian
> packages will hopefully do something more reasonable). The only issue
> here is API stability - we can't switch until we have assurance of this.
>
> 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.
Sure.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Interface-dev
mailing list