[Interface-dev] Twisted switch progress report

Itamar Shtull-Trauring itamar at itamarst.org
Mon May 10 12:40:16 EDT 2004


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.

-- 
Itamar Shtull-Trauring    http://itamarst.org
Looking for a job -- http://itamarst.org/resume.html




More information about the Interface-dev mailing list