From: Benjamin Peterson Date: Sat, 3 Apr 2010 15:58:15 +0000 (+0000) Subject: remove deprecation warnings silence attempting X-Git-Tag: v2.7b1~97 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=674a9eb6e3504d309d83ab84f1c49c9276880cd2;p=python remove deprecation warnings silence attempting --- diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py index b935631fc9..fa44900a30 100644 --- a/Lib/bsddb/__init__.py +++ b/Lib/bsddb/__init__.py @@ -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':