[Checkins] SVN: z3c.relationfield/trunk/src/z3c/relationfield/event.py Subscribe to only the simple event, since they are both fired under five.intid.

Alec Mitchell alecpm at gmail.com
Tue Jun 30 11:27:50 EDT 2009


Log message for revision 101342:
  Subscribe to only the simple event, since they are both fired under five.intid.
  

Changed:
  U   z3c.relationfield/trunk/src/z3c/relationfield/event.py

-=-
Modified: z3c.relationfield/trunk/src/z3c/relationfield/event.py
===================================================================
--- z3c.relationfield/trunk/src/z3c/relationfield/event.py	2009-06-30 15:21:20 UTC (rev 101341)
+++ z3c.relationfield/trunk/src/z3c/relationfield/event.py	2009-06-30 15:27:49 UTC (rev 101342)
@@ -19,8 +19,6 @@
                                           IRelationValue,
                                           ITemporaryRelationValue)
 
-# five.intid dispatches an object event for efficiency
- at grok.subscribe(IHasOutgoingRelations, IIntIdAddedEvent)
 def addRelations(obj, event):
     """Register relations.
 
@@ -29,9 +27,10 @@
     for name, relation in _relations(obj):
          _setRelation(obj, name, relation)
 
-# zope.app.intid dispatches a normal event, so we need to check that the object
-# has relations.  This adds some overhead to every intid registration,
-# which would not be needed if an object event were fired.
+# zope.app.intid dispatches a normal event, so we need to check that
+# the object has relations.  This adds a little overhead to every
+# intid registration, which would not be needed if an object event
+# were dispatched in zope.app.intid.
 @grok.subscribe(IIntIdAddedEvent)
 def addRelationsEventOnly(event):
     obj = event.object



More information about the Checkins mailing list