[edit controller] only display warning on specific adapters
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 02 Nov 2011 10:33:33 +0100
changeset 8041 81794aa0c8b4
parent 8039 1fe90d4ec307
child 8042 27ab1649bd71
[edit controller] only display warning on specific adapters also drop buggy @deprecated
web/views/editcontroller.py
--- a/web/views/editcontroller.py	Fri Oct 28 12:07:37 2011 +0200
+++ b/web/views/editcontroller.py	Wed Nov 02 10:33:33 2011 +0100
@@ -38,11 +38,11 @@
     __regid__ = 'IEditControl'
     __select__ = is_instance('Any')
 
-    @deprecated()
     def __init__(self, _cw, **kwargs):
-        warn('[3.14] IEditControlAdapter is deprecated, override EditController'
-             ' using match_edited_type or match_form_id selectors for example.',
-             DeprecationWarning)
+        if self.__class__ is not IEditControlAdapter:
+            warn('[3.14] IEditControlAdapter is deprecated, override EditController'
+                 ' using match_edited_type or match_form_id selectors for example.',
+                 DeprecationWarning)
         super(IEditControlAdapter, self).__init__(_cw, **kwargs)
 
     @implements_adapter_compat('IEditControl')