[Twisted-Python] New components questions

Christopher Armstrong radix at twistedmatrix.com
Fri May 7 18:31:12 EDT 2004

Itamar Shtull-Trauring wrote:
> 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.

AFAIC, persist= argument to adaptation doesn't make sense and shouldn't 
be worried about much. Deprecated backwards compatibility would be 
*nice*, of course, but don't worry about it if it's a big problem and 
nobody pipes up about the fact they're using it.

> 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.

Definitely B or C... probably B, unless distutils grows automatic 
dependency downloading/management. :-P

> 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.

Is the current situation duplicating code? If a "registry" is basically 
just a big dict or something, then no big deal... but I think sharing 
code is a good idea, if there is a significant amount of code involved.

  Twisted | Christopher Armstrong: International Man of Twistery
   Radix  |          Release Manager,  Twisted Project
---------+           http://radix.twistedmatrix.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20040507/0ae43eef/attachment.pgp 

More information about the Twisted-Python mailing list