[Twisted-Python] New components questions
itamar at itamarst.org
Fri May 7 18:57:22 EDT 2004
On Fri, 2004-05-07 at 18:31, Christopher Armstrong wrote:
> 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.
I have full backwards compat already, though I'd encourage people to use
zope's code directly instead of the compat layer. Question is if this
specific backwards compat feature can be dropped (this will allow
Componentized to work with straight-off zope.interface correctly, right
now it only works via backwards-compat code). That is, I am asking if
persist=False can be dropped for Componentized.
> 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.
No, the zope.interface has the class definition for a registry,
zope.component just adds a little utility wrapper around it and provides
a global *instance* of the registry that apps can use.
Itamar Shtull-Trauring http://itamarst.org
Looking for a job -- http://itamarst.org/resume.html
More information about the Twisted-Python