mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
remove deprecation warnings silence attempting
This commit is contained in:
parent
8a95071fc1
commit
674a9eb6e3
1 changed files with 1 additions and 2 deletions
|
@ -43,12 +43,11 @@ import sys
|
||||||
absolute_import = (sys.version_info[0] >= 3)
|
absolute_import = (sys.version_info[0] >= 3)
|
||||||
|
|
||||||
if (sys.version_info >= (2, 6)) and (sys.version_info < (3, 0)) :
|
if (sys.version_info >= (2, 6)) and (sys.version_info < (3, 0)) :
|
||||||
if sys.py3kwarning and (__name__ != 'bsddb3') :
|
|
||||||
import warnings
|
import warnings
|
||||||
|
if sys.py3kwarning and (__name__ != 'bsddb3') :
|
||||||
warnings.warnpy3k("in 3.x, the bsddb module has been removed; "
|
warnings.warnpy3k("in 3.x, the bsddb module has been removed; "
|
||||||
"please use the pybsddb project instead",
|
"please use the pybsddb project instead",
|
||||||
DeprecationWarning, 2)
|
DeprecationWarning, 2)
|
||||||
warnings.filterwarnings("*PyCObject*", DeprecationWarning, "_bsddb")
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if __name__ == 'bsddb3':
|
if __name__ == 'bsddb3':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue