[Zope-Checkins] SVN: Zope/branches/2.9/ Collector #2307:
ObjectCopiedEvent not dispatched to sublocations.
Stefan H. Holek
stefan at epy.co.at
Wed Jun 20 05:53:40 EDT 2007
Log message for revision 76827:
Collector #2307: ObjectCopiedEvent not dispatched to sublocations.
Changed:
U Zope/branches/2.9/doc/CHANGES.txt
U Zope/branches/2.9/lib/python/OFS/subscribers.py
U Zope/branches/2.9/lib/python/OFS/tests/testCopySupportEvents.py
-=-
Modified: Zope/branches/2.9/doc/CHANGES.txt
===================================================================
--- Zope/branches/2.9/doc/CHANGES.txt 2007-06-20 06:35:41 UTC (rev 76826)
+++ Zope/branches/2.9/doc/CHANGES.txt 2007-06-20 09:53:38 UTC (rev 76827)
@@ -8,6 +8,8 @@
Bugs fixed
+ - Collector #2307: ObjectCopiedEvent not dispatched to sublocations.
+
- Fixed ZClass test breakage due to non-pickleability of
'zope.interface.Implements'
Modified: Zope/branches/2.9/lib/python/OFS/subscribers.py
===================================================================
--- Zope/branches/2.9/lib/python/OFS/subscribers.py 2007-06-20 06:35:41 UTC (rev 76826)
+++ Zope/branches/2.9/lib/python/OFS/subscribers.py 2007-06-20 09:53:38 UTC (rev 76827)
@@ -125,7 +125,14 @@
if OFS.interfaces.IObjectManager.providedBy(ob):
dispatchToSublocations(ob, event)
+def dispatchObjectCopiedEvent(ob, event):
+ """Multi-subscriber for IItem + IObjectCopiedEvent.
+ """
+ # Dispatch to sublocations
+ if OFS.interfaces.IObjectManager.providedBy(ob):
+ dispatchToSublocations(ob, event)
+
def callManageAfterAdd(ob, item, container):
"""Compatibility subscriber for manage_afterAdd.
"""
Modified: Zope/branches/2.9/lib/python/OFS/tests/testCopySupportEvents.py
===================================================================
--- Zope/branches/2.9/lib/python/OFS/tests/testCopySupportEvents.py 2007-06-20 06:35:41 UTC (rev 76826)
+++ Zope/branches/2.9/lib/python/OFS/tests/testCopySupportEvents.py 2007-06-20 09:53:38 UTC (rev 76827)
@@ -224,7 +224,7 @@
self.subfolder.manage_clone(self.folder.myfolder, 'myfolder')
self.assertEqual(eventlog.called(),
[('myfolder', 'ObjectCopiedEvent'),
- #('mydoc', 'ObjectCopiedEvent'),
+ ('mydoc', 'ObjectCopiedEvent'),
('myfolder', 'ObjectWillBeAddedEvent'),
('mydoc', 'ObjectWillBeAddedEvent'),
('myfolder', 'ObjectAddedEvent'),
@@ -240,7 +240,7 @@
self.subfolder.manage_pasteObjects(cb)
self.assertEqual(eventlog.called(),
[('myfolder', 'ObjectCopiedEvent'),
- #('mydoc', 'ObjectCopiedEvent'),
+ ('mydoc', 'ObjectCopiedEvent'),
('myfolder', 'ObjectWillBeAddedEvent'),
('mydoc', 'ObjectWillBeAddedEvent'),
('myfolder', 'ObjectAddedEvent'),
@@ -282,7 +282,7 @@
self.folder.myfolder.COPY(req, req.RESPONSE)
self.assertEqual(eventlog.called(),
[('myfolder', 'ObjectCopiedEvent'),
- #('mydoc', 'ObjectCopiedEvent'),
+ ('mydoc', 'ObjectCopiedEvent'),
('myfolder', 'ObjectWillBeAddedEvent'),
('mydoc', 'ObjectWillBeAddedEvent'),
('myfolder', 'ObjectAddedEvent'),
More information about the Zope-Checkins
mailing list