[Zope3-checkins] SVN: Zope3/branches/3.3/src/zope/app/keyreference/
Make adapter easier to register from Python and remove redudant info
Philipp von Weitershausen
philikon at philikon.de
Sat Aug 26 14:04:08 EDT 2006
Log message for revision 69785:
Make adapter easier to register from Python and remove redudant info
from ZCML accordingly.
Unfortuantely, we can't add adapts()/adapter() declarations here because
these adapters adapt persistent.interfaces.IPersistent. Importing it
isn't possible, however, because of Python's stupid relative import
rule. THank God that's getting changed.
Changed:
U Zope3/branches/3.3/src/zope/app/keyreference/configure.zcml
U Zope3/branches/3.3/src/zope/app/keyreference/persistent.py
-=-
Modified: Zope3/branches/3.3/src/zope/app/keyreference/configure.zcml
===================================================================
--- Zope3/branches/3.3/src/zope/app/keyreference/configure.zcml 2006-08-25 22:19:03 UTC (rev 69784)
+++ Zope3/branches/3.3/src/zope/app/keyreference/configure.zcml 2006-08-26 18:04:06 UTC (rev 69785)
@@ -2,7 +2,6 @@
<adapter
for="persistent.interfaces.IPersistent"
- provides=".interfaces.IKeyReference"
factory=".persistent.KeyReferenceToPersistent"
trusted="y"
/>
@@ -13,7 +12,6 @@
<adapter
for="persistent.interfaces.IPersistent"
- provides="ZODB.interfaces.IConnection"
factory=".persistent.connectionOfPersistent"
/>
Modified: Zope3/branches/3.3/src/zope/app/keyreference/persistent.py
===================================================================
--- Zope3/branches/3.3/src/zope/app/keyreference/persistent.py 2006-08-25 22:19:03 UTC (rev 69784)
+++ Zope3/branches/3.3/src/zope/app/keyreference/persistent.py 2006-08-26 18:04:06 UTC (rev 69785)
@@ -62,6 +62,7 @@
return cmp(self.key_type_id, other.key_type_id)
+ at zope.interface.implementer(IConnection)
def connectionOfPersistent(ob):
"""An adapter which gets a ZODB connection of a persistent object.
More information about the Zope3-Checkins
mailing list