[Checkins] SVN: five.localsitemanager/branches/elro-parent-pointers2/src/five/localsitemanager/registry.py Basic compatibility with parent pointers on Zope 4, though it should make the wrapping code moot.
Lawrence Rowe
cvs-admin at zope.org
Thu Aug 30 15:56:04 UTC 2012
Log message for revision 127650:
Basic compatibility with parent pointers on Zope 4, though it should make the wrapping code moot.
Changed:
U five.localsitemanager/branches/elro-parent-pointers2/src/five/localsitemanager/registry.py
-=-
Modified: five.localsitemanager/branches/elro-parent-pointers2/src/five/localsitemanager/registry.py
===================================================================
--- five.localsitemanager/branches/elro-parent-pointers2/src/five/localsitemanager/registry.py 2012-08-30 15:51:56 UTC (rev 127649)
+++ five.localsitemanager/branches/elro-parent-pointers2/src/five/localsitemanager/registry.py 2012-08-30 15:56:00 UTC (rev 127650)
@@ -18,6 +18,7 @@
import zope.component.interfaces
import zope.event
from Acquisition.interfaces import IAcquirer
+from OFS.Application import Application
from OFS.ObjectManager import ObjectManager
try:
from zope.component.hooks import getSite
@@ -29,11 +30,12 @@
from zope.component.persistentregistry import PersistentComponents
from zope.component.registry import _getUtilityProvided
from zope.component.registry import UtilityRegistration
+from zope.interface import implements
from zope.interface.adapter import _lookup
from zope.interface.adapter import _lookupAll
from zope.interface.adapter import _subscriptions
from zope.interface.adapter import VerifyingAdapterLookup
-from ZPublisher.BaseRequest import RequestContainer
+from zope.location.interfaces import IContained
from five.localsitemanager.utils import get_parent
@@ -192,7 +194,7 @@
obj = Acquisition.aq_inner(obj)
base = Acquisition.aq_base(obj)
parent = Acquisition.aq_parent(obj)
- if parent is None or isinstance(parent, RequestContainer):
+ if parent is None or isinstance(parent, Application):
return base
return base.__of__(_rewrap(parent))
@@ -218,6 +220,8 @@
the ISite) as their acquired parent.
"""
+ implements(IContained)
+
def _init_registries(self):
super(PersistentComponents, self)._init_registries()
utilities = Acquisition.aq_base(self.utilities)
More information about the checkins
mailing list