]> granicus.if.org Git - python/commitdiff
remove deprecation warnings silence attempting
authorBenjamin Peterson <benjamin@python.org>
Sat, 3 Apr 2010 15:58:15 +0000 (15:58 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sat, 3 Apr 2010 15:58:15 +0000 (15:58 +0000)
Lib/bsddb/__init__.py

index b935631fc94ab4961977a074a07782dc7e79c2c4..fa44900a30d9a0a211d9c7fb378fb25050a16b2b 100644 (file)
@@ -43,12 +43,11 @@ import sys
 absolute_import = (sys.version_info[0] >= 3)
 
 if (sys.version_info >= (2, 6)) and (sys.version_info < (3, 0)) :
+    import warnings
     if sys.py3kwarning and (__name__ != 'bsddb3') :
-        import warnings
         warnings.warnpy3k("in 3.x, the bsddb module has been removed; "
                           "please use the pybsddb project instead",
                           DeprecationWarning, 2)
-    warnings.filterwarnings("*PyCObject*", DeprecationWarning, "_bsddb")
 
 try:
     if __name__ == 'bsddb3':