ignore some internal warnings stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Tue, 13 Oct 2009 07:31:51 +0200
branchstable
changeset 3650 012da21e43fe
parent 3644 b5a8ba388494
child 3651 633b8971c95a
ignore some internal warnings prevent the display of warnings caused by the definition of deprecated functions so that the output of cubicweb-ctl is not polluted.
selectors.py
--- a/selectors.py	Mon Oct 12 17:11:21 2009 +0200
+++ b/selectors.py	Tue Oct 13 07:31:51 2009 +0200
@@ -43,7 +43,7 @@
 __docformat__ = "restructuredtext en"
 
 import logging
-from warnings import warn
+from warnings import warn, filterwarnings
 
 from logilab.common.compat import all
 from logilab.common.deprecation import deprecated
@@ -977,6 +977,10 @@
 
 
 # XXX DEPRECATED ##############################################################
+# XXX remove when deprecated functions are removed
+filterwarnings('ignore',
+               category=DeprecationWarning,
+               module='cubicweb.selectors')
 from cubicweb.vregistry import chainall
 
 yes_selector = deprecated()(yes)
@@ -1171,3 +1175,4 @@
                                                 action=getattr(cls, 'require_permission', 'read'))
         return cls
     return plug_selector
+