cwconfig.py
branchstable
changeset 7822 ce8a4de2ecf1
parent 7815 2a164a9cf81c
child 7879 9aae456abab5
--- a/cwconfig.py	Wed Sep 21 19:04:33 2011 +0200
+++ b/cwconfig.py	Thu Sep 22 10:02:17 2011 +0200
@@ -144,7 +144,8 @@
 from threading import Lock
 from os.path import (exists, join, expanduser, abspath, normpath,
                      basename, isdir, dirname, splitext)
-from warnings import warn
+from warnings import warn, filterwarnings
+
 from logilab.common.decorators import cached, classproperty
 from logilab.common.deprecation import deprecated
 from logilab.common.logging_ext import set_log_methods, init_log
@@ -696,6 +697,9 @@
         return vregpath
 
     def __init__(self, debugmode=False):
+        if debugmode:
+            # in python 2.7, DeprecationWarning are not shown anymore by default
+            filterwarnings('default', category=DeprecationWarning)
         register_stored_procedures()
         self._cubes = None
         super(CubicWebNoAppConfiguration, self).__init__()