[Checkins] SVN: z3c.relationfield/trunk/src/z3c/relationfield/ reducing dependency on Grok:
Martijn Faassen
faassen at infrae.com
Fri Oct 17 11:25:11 EDT 2008
Log message for revision 92305:
reducing dependency on Grok:
the utility doesn't need to subclass from grok.LocalUtility to make
things work.
Changed:
U z3c.relationfield/trunk/src/z3c/relationfield/ftests.py
U z3c.relationfield/trunk/src/z3c/relationfield/index.py
-=-
Modified: z3c.relationfield/trunk/src/z3c/relationfield/ftests.py
===================================================================
--- z3c.relationfield/trunk/src/z3c/relationfield/ftests.py 2008-10-17 15:20:53 UTC (rev 92304)
+++ z3c.relationfield/trunk/src/z3c/relationfield/ftests.py 2008-10-17 15:25:11 UTC (rev 92305)
@@ -7,6 +7,8 @@
from zope.app.intid import IntIds
from zope.app.intid.interfaces import IIntIds
+from zc.relation.interfaces import ICatalog
+
from z3c.relationfield.interfaces import IHasRelations
from z3c.relationfield import Relation, RelationCatalog
@@ -30,7 +32,7 @@
"""Test fixture used by README.txt.
"""
grok.local_utility(IntIds, provides=IIntIds)
- grok.local_utility(RelationCatalog)
+ grok.local_utility(RelationCatalog, provides=ICatalog)
def test_suite():
globs = { 'TestApp': TestApp, 'IItem': IItem, 'Item': Item }
Modified: z3c.relationfield/trunk/src/z3c/relationfield/index.py
===================================================================
--- z3c.relationfield/trunk/src/z3c/relationfield/index.py 2008-10-17 15:20:53 UTC (rev 92304)
+++ z3c.relationfield/trunk/src/z3c/relationfield/index.py 2008-10-17 15:25:11 UTC (rev 92305)
@@ -1,5 +1,3 @@
-import grok
-
import BTrees
from zope import component
@@ -22,8 +20,7 @@
intids = cache['intids'] = component.getUtility(IIntIds)
return intids.getObject(token)
-class RelationCatalog(Catalog, grok.LocalUtility):
- grok.provides(ICatalog)
+class RelationCatalog(Catalog):
def __init__(self):
Catalog.__init__(self, dump, load)
More information about the Checkins
mailing list