[Zope-Checkins] SVN: Zope/z212-deprecation-cleanup/lib/python/ removed deprecated APIs

Andreas Jung andreas at andreas-jung.com
Mon Jun 30 15:09:43 EDT 2008


Log message for revision 87865:
  removed deprecated APIs
  

Changed:
  U   Zope/z212-deprecation-cleanup/lib/python/OFS/OrderSupport.py
  U   Zope/z212-deprecation-cleanup/lib/python/webdav/Resource.py

-=-
Modified: Zope/z212-deprecation-cleanup/lib/python/OFS/OrderSupport.py
===================================================================
--- Zope/z212-deprecation-cleanup/lib/python/OFS/OrderSupport.py	2008-06-30 18:46:47 UTC (rev 87864)
+++ Zope/z212-deprecation-cleanup/lib/python/OFS/OrderSupport.py	2008-06-30 19:09:42 UTC (rev 87865)
@@ -261,16 +261,8 @@
         old_position = self.getObjectPosition(id)
         result = super(OrderSupport, self).manage_renameObject(id, new_id,
                                                                REQUEST)
-        try:
-            self.moveObjectToPosition(new_id, old_position,
-                                      suppress_events=True)
-        except TypeError:
-            # BBB: removed in Zope 2.11
-            self.moveObjectToPosition(new_id, old_position)
-            warnings.warn(
-                "%s.moveObjectToPosition without suppress_events is "
-                "deprecated and will be removed in Zope 2.11." %
-                self.__class__.__name__, DeprecationWarning)
+        self.moveObjectToPosition(new_id, old_position,
+                                  suppress_events=True)
         return result
 
     def tpValues(self):

Modified: Zope/z212-deprecation-cleanup/lib/python/webdav/Resource.py
===================================================================
--- Zope/z212-deprecation-cleanup/lib/python/webdav/Resource.py	2008-06-30 18:46:47 UTC (rev 87864)
+++ Zope/z212-deprecation-cleanup/lib/python/webdav/Resource.py	2008-06-30 19:09:42 UTC (rev 87865)
@@ -535,30 +535,14 @@
         ob = self._getCopy(parent)
         ob._setId(name)
 
-        try:
-            orig_container._delObject(orig_id, suppress_events=True)
-        except TypeError:
-            # BBB: removed in Zope 2.11
-            orig_container._delObject(orig_id)
-            warnings.warn(
-                "%s._delObject without suppress_events is deprecated "
-                "and will be removed in Zope 2.11." %
-                orig_container.__class__.__name__, DeprecationWarning)
+        orig_container._delObject(orig_id, suppress_events=True)
 
         if existing:
             object=getattr(parent, name)
             self.dav__validate(object, 'DELETE', REQUEST)
             parent._delObject(name)
 
-        try:
-            parent._setObject(name, ob, set_owner=0, suppress_events=True)
-        except TypeError:
-            # BBB: removed in Zope 2.11
-            parent._setObject(name, ob, set_owner=0)
-            warnings.warn(
-                "%s._setObject without suppress_events is deprecated "
-                "and will be removed in Zope 2.11." %
-                parent.__class__.__name__, DeprecationWarning)
+        parent._setObject(name, ob, set_owner=0, suppress_events=True)
         ob = parent._getOb(name)
 
         notify(ObjectMovedEvent(ob, orig_container, orig_id, parent, name))



More information about the Zope-Checkins mailing list