[Zope-dev] Stacking zope.component registries
Martin Aspeli
optilude+lists at gmail.com
Thu Apr 8 20:28:03 EDT 2010
Stephan Richter wrote:
> On Thursday 08 April 2010, Marius Gedminas wrote:
>> Someone (I'm bad with names, sorry!) recently proposed a change to
>> zope.configuration that makes ZCML directives use getSiteManager()
>> instead of getGlobalSiteManager(); with that patch in, Chris's example
>> should make ZCML configuration register all the components into your
>> stacked registry. Although you'd have the other problem of setSite()
>> having no effect on the site manager, which would break all local
>> utilities and adapters in your tests.
>
> What about using z3c.baseregistry? You can wrap the baseregistry call around
> your ZCML. This way you can create on registry per layer and then use the
> __bases__ attribute to stack them together.
Yes, I did look at it. However, the real goal is to provide isolation
for "anything" that makes ZCA registrations. In particular, that
includes provideAdapter() and friends. I suspect z3c.baseregistry can't
deal with this?
Martin
--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book
More information about the Zope-Dev
mailing list