Some DeprecationWarning fixes

This commit is contained in:
Miroslav Stampar
2022-06-22 13:05:41 +02:00
parent df4293473d
commit e8731e1af5
3 changed files with 13 additions and 7 deletions

View File

@@ -36,7 +36,10 @@ try:
warnings.filterwarnings(action="ignore", category=DeprecationWarning)
else:
warnings.resetwarnings()
warnings.simplefilter("ignore", category=ResourceWarning, append=1)
warnings.filterwarnings(action="ignore", message="'crypt'", category=DeprecationWarning)
warnings.simplefilter("ignore", category=ImportWarning)
if sys.version_info >= (3, 0):
warnings.simplefilter("ignore", category=ResourceWarning)
warnings.filterwarnings(action="ignore", message="Python 2 is no longer supported")
warnings.filterwarnings(action="ignore", message=".*was already imported", category=UserWarning)