ObjectClonedEvent in OFS.CopySupport should probably carry orig_ob too

Bug #314580 reported by Matt
2
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Wishlist
Unassigned

Bug Description

the following snippet is from manage_pasteObjects in http://svn.zope.org/Zope/trunk/lib/python/OFS/CopySupport.py?rev=94458&view=markup

                orig_ob = ob
                ob = ob._getCopy(self)
                ob._setId(id)
                notify(ObjectCopiedEvent(ob, orig_ob))

                self._setObject(id, ob)
                ob = self._getOb(id)
                ob.wl_clearLocks()

                ob._postCopy(self, op=0)

                compatibilityCall('manage_afterClone', ob, ob)

                notify(ObjectClonedEvent(ob))

Why is orig_ob not passed to ObjectClonedEvent as it is in ObjectCopiedEvent? It would be nice to have both ob and orig_ob with acquisition contexts available at the ObjectClonedEvent point. ob at the point of ObjectCopiedEvent has not been set yet and as such this event has limited use when one wants to inspect the new context the object will reside in.

Changed in zope2:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.