[Twisted-Python] New components questions

Itamar Shtull-Trauring itamar at itamarst.org
Fri May 7 18:14:32 EDT 2004


1. Currently, if c is a Componentized, IFoo(c, persist=False) will
bypass c.getComponent() and do standard lookup. Is it worth supporting
this at all? It'd make code cleaner if not, and integration with
zope.interface easier.

2. How do we package zope.interface package? We could:

  a. include copy of code, as e.g. twisted.interface, and have it
     replace itself with zope.interface if that exists. This opens
     us to possible _xmlplus style horribleness.
  b. install zope.interface in our setup.py if it doesn't exist.
  c. tell people to install it themselves.

3. Do we want our own adapter registry or not? Zope's global registry is
in zope.component, which is a whole new package we need to install and
backport to 2.2. And it has lots of other stuff which while interesting
and possibly useful means more cognitive overhead. My current code has
its own registry and does not require zope.component. The downside is
that if we have our own registry, code that uses both Twisted and
zope.component will cause adaptation to an interface will be slower
because it will need to check two registries.
 
-- 
Itamar Shtull-Trauring    http://itamarst.org
Looking for a job -- http://itamarst.org/resume.html





More information about the Twisted-Python mailing list