Skip to content

Commit

Permalink
Kept for informational reasons.
Browse files Browse the repository at this point in the history
  • Loading branch information
rockyburt committed Jul 15, 2007
1 parent 6dcfb76 commit c445f2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/five/localsitemanager/localsitemanager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Of course we now need to transform that IPossibleSite into a real ISite.
>>> from five.localsitemanager import make_objectmanager_site
>>> make_objectmanager_site(site)
>>> sitemanager = site.getSiteManager()
>>> import pdb; pdb.set_trace()
>>> sitemanager
<PersistentComponents ...>

Expand Down
8 changes: 6 additions & 2 deletions src/five/localsitemanager/registry.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import Acquisition
import ComputedAttribute
from zope.component.interfaces import ComponentLookupError
import zope.component.persistentregistry
import zope.interface.adapter
import OFS.ObjectManager

_marker = object()

class AqAwareAdapterLookup(zope.interface.adapter.VerifyingAdapterLookup):
class AqAwareAdapterLookup(Acquisition.Explicit,
zope.interface.adapter.VerifyingAdapterLookup):
"""A lookup that is identical to VerifyingAdapterLookup except that
it returns updated aq-wrapped components.
"""

def lookup(self, *args, **kwargs):
import pdb; pdb.set_trace()
comp = super(AqAwareAdapterLookup, self).lookup(*args, **kwargs)
return self._wrap(comp)

Expand Down Expand Up @@ -51,7 +54,8 @@ def _wrap(self, comp):
return comp

class PersistentAdapterRegistry \
(zope.component.persistentregistry.PersistentAdapterRegistry):
(Acquisition.Explicit,
zope.component.persistentregistry.PersistentAdapterRegistry):
"""An adapter registry that uses a lookup delegate that is aq-aware.
"""

Expand Down

0 comments on commit c445f2a

Please sign in to comment.