[Zope3-checkins] SVN: Zope3/trunk/ Deprecated a hack I inserted not
realizing that subscriptions are a cleaner way to do the same thing.
Garrett Smith
garrett at mojave-corp.com
Sun Feb 20 18:37:00 EST 2005
Log message for revision 29229:
Deprecated a hack I inserted not realizing that subscriptions are a cleaner way to do the same thing.
Changed:
U Zope3/trunk/doc/CHANGES.txt
U Zope3/trunk/src/zope/app/copypastemove/__init__.py
-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt 2005-02-20 17:02:42 UTC (rev 29228)
+++ Zope3/trunk/doc/CHANGES.txt 2005-02-20 23:37:00 UTC (rev 29229)
@@ -416,6 +416,10 @@
Instead of `rename(container, oldName, newName)`, one should use
`IContainerItemRenamer(container).renameItem(oldName, newName)`.
+ - Deprecated _configureCopy in zope.app.copypastemove.ObjectCopier. To
+ configure a recently copied object, suscribe to IObjectCopiedEvent for
+ the type of object you're interested in configuring.
+
Bug Fixes
- When I converted layers and skins to interfaces, I got the layer part
Modified: Zope3/trunk/src/zope/app/copypastemove/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/copypastemove/__init__.py 2005-02-20 17:02:42 UTC (rev 29228)
+++ Zope3/trunk/src/zope/app/copypastemove/__init__.py 2005-02-20 23:37:00 UTC (rev 29229)
@@ -393,7 +393,7 @@
new_name = chooser.chooseName(new_name, obj)
copy = locationCopy(obj)
- self._configureCopy(copy, target, new_name)
+ copy.__parent__ = copy.__name__ = None
notify(ObjectCopiedEvent(copy))
target[new_name] = copy
@@ -409,6 +409,11 @@
Subclasses may override this method to perform additional
configuration of the copied object.
"""
+ # BBB (remove in 3.3)
+ warnings.warn(
+ "_configureCopy is deprecated -- to configure a recently copied"
+ "object, register a handler for IObjectCopiedEvent",
+ DeprecationWarning)
copy.__parent__ = copy.__name__ = None
def copyable(self):
More information about the Zope3-Checkins
mailing list