[Zope-dev] Re: unregistering components?
Chris Withers
chris at simplistix.co.uk
Wed Nov 28 18:54:13 EST 2007
Philipp von Weitershausen wrote:
> zope.app.component.site contains the LocalSiteManager class. This is the
> persistent component registry used in Zope 3's standard ISites. It
> inherits from zope.component.persistentregistry.PersistentComponents
> which in turn inherits from zope.component.registry.Components. The
> latter has the dynamic __bases__ property. You'll see that the setter
> really just sets the __bases__ on its internal adapter and utility
> registry. Both of those (sic!) are some sort of subclass of
> zope.interface.adapter.BaseAdapterRegistry which has the handling for
> cascading lookups through its __bases__ property.
>
> :)
This does all look pretty scary...
What code do I need to read to see how to setup a group of registries
where a search for adapters/etc gives:
- the sum of all the registries (ie: all possible adapters are returned)
- the "most appropriate" adapter is returned (ie: the "first" registry
is searched and if no matching adapter/etc is found, the "second"
registry is searched, etc)
> If eggs had some decent dependency handling.
Surely that's kinda key in any kind of package management system, which
eggs surely are? ;-)
>> Why?
>
> Because some developers prefer lower traffic lists that focus on solely
> on development.
All three lists together now consitute less than one "low volume list"
from what I can see :-S
>> If it helps, as far as components and registries goes, I'm aiming for
>> something like skin-like stacked registries that can be altered ttw...
>
> Sounds wild :)
Indeed, I have a nagging feeling the hard work for this has already been
done, which is why I'm trying to find otu how to re-use it rather than
re-inventing wheels...
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the Zope-Dev
mailing list