Tres Seaver wrote:
> Martin Aspeli wrote:
>> Jens Vagelpohl wrote:
>>> All those who think this is somehow impure and dirty, keep in mind
>>> that this arrangement won't be forever, only for the 2.1 branch.
>>> Afterwards there's more time to plan on packaging things differently.
>> The only thing that worries me is that if we artificially inject it into
>> Products.* and then want to move it, we'll have module aliases to
>> contend with.
> Shouldn't need them, unless we are somehow createing persistent objects
> from that package / product. I thought all that stuff happened at
> runtime, with no persistence?
The local registry we are already using is persistent, so will be the
new registry, where the main difference is that the new one is smarter
about handling nested local registries and Acquisition wrapped
utilities. The current code looks something like this:
from zope.component.globalregistry import base
from zope.component.persistentregistry import PersistentComponents
from Products.Five.component import enableSite
from Products.Five.component.interfaces import IObjectManagerSite
def enableSite(self, portal):
components = PersistentComponents()
components.__bases__ = (base,)
where setSiteManager is part of OFS.ObjectManager and defined as:
def setSiteManager(self, components):
self._components = components
We wouldn't need a GenericSetup exportimport handler for the component
registry when the information wouldn't be persistent.
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests