Log message for revision 81167:
  Backported discouraged warning for manage_* events from trunk
  

Changed:
  U   Zope/branches/2.10/doc/CHANGES.txt
  U   Zope/branches/2.10/lib/python/OFS/CopySupport.py
  U   Zope/branches/2.10/lib/python/OFS/subscribers.py

-=-
Modified: Zope/branches/2.10/doc/CHANGES.txt
===================================================================
--- Zope/branches/2.10/doc/CHANGES.txt  2007-10-28 09:38:41 UTC (rev 81166)
+++ Zope/branches/2.10/doc/CHANGES.txt  2007-10-28 09:40:32 UTC (rev 81167)
@@ -6,6 +6,13 @@
 
   Zope 2.10.5 (unreleased)
 
+    Other changes
+
+      - Turned deprecation warnings for manage_afterAdd, manage_beforeDelete
+        and manage_afterClone methods into discouraged warnings. These methods
+        will not be removed in Zope 2.11, but stay for the foreseeable future.
+        Using events is still highly encouraged.
+
     Bugs fixed
 
       - Launchpad #147201: treat container-class in zope.conf as a string,

Modified: Zope/branches/2.10/lib/python/OFS/CopySupport.py
===================================================================
--- Zope/branches/2.10/lib/python/OFS/CopySupport.py    2007-10-28 09:38:41 UTC 
(rev 81166)
+++ Zope/branches/2.10/lib/python/OFS/CopySupport.py    2007-10-28 09:40:32 UTC 
(rev 81167)
@@ -272,24 +272,21 @@
                 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)
+                        "%s._delObject without suppress_events is discouraged."
+                        % orig_container.__class__.__name__,
+                        DeprecationWarning)
                 ob = aq_base(ob)
                 ob._setId(id)
 
                 try:
                     self._setObject(id, ob, set_owner=0, suppress_events=True)
                 except TypeError:
-                    # BBB: removed in Zope 2.11
                     self._setObject(id, ob, set_owner=0)
                     warnings.warn(
-                        "%s._setObject without suppress_events is deprecated "
-                        "and will be removed in Zope 2.11." %
-                        self.__class__.__name__, DeprecationWarning)
+                        "%s._setObject without suppress_events is discouraged."
+                        % self.__class__.__name__, DeprecationWarning)
                 ob = self._getOb(id)
 
                 notify(ObjectMovedEvent(ob, orig_container, orig_id, self, id))
@@ -362,11 +359,9 @@
         try:
             self._delObject(id, suppress_events=True)
         except TypeError:
-            # BBB: removed in Zope 2.11
             self._delObject(id)
             warnings.warn(
-                "%s._delObject without suppress_events is deprecated "
-                "and will be removed in Zope 2.11." %
+                "%s._delObject without suppress_events is discouraged." %
                 self.__class__.__name__, DeprecationWarning)
         ob = aq_base(ob)
         ob._setId(new_id)
@@ -376,11 +371,9 @@
         try:
             self._setObject(new_id, ob, set_owner=0, suppress_events=True)
         except TypeError:
-            # BBB: removed in Zope 2.11
             self._setObject(new_id, ob, set_owner=0)
             warnings.warn(
-                "%s._setObject without suppress_events is deprecated "
-                "and will be removed in Zope 2.11." %
+                "%s._setObject without suppress_events is discouraged." %
                 self.__class__.__name__, DeprecationWarning)
         ob = self._getOb(new_id)
 

Modified: Zope/branches/2.10/lib/python/OFS/subscribers.py
===================================================================
--- Zope/branches/2.10/lib/python/OFS/subscribers.py    2007-10-28 09:38:41 UTC 
(rev 81166)
+++ Zope/branches/2.10/lib/python/OFS/subscribers.py    2007-10-28 09:40:32 UTC 
(rev 81167)
@@ -68,10 +68,8 @@
         return
     class_ = ob.__class__
     warnings.warn(
-        "%s.%s.%s is deprecated and will be removed in Zope 2.11, "
-        "you should use event subscribers instead, and meanwhile "
-        "mark the class with <five:deprecatedManageAddDelete/>"
-        % (class_.__module__, class_.__name__, method_name),
+        "%s.%s.%s is discouraged. You should use event subscribers instead." %
+        (class_.__module__, class_.__name__, method_name),
         DeprecationWarning)
 
 ##################################################

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to