diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-06-24 16:38:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-25 00:38:01 +0100 |
commit | 8bec9fb92f09d02c24611ebd0a90103a1a414a40 (patch) | |
tree | 7fbbc8b020e80966714e9d75885255d1442d5db4 /Lib/test/test_ssl.py | |
parent | a80a38ee9a7b2e26dba848793cc298d8435fddd5 (diff) | |
download | cpython-git-8bec9fb92f09d02c24611ebd0a90103a1a414a40.tar.gz |
bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in tests (GH-26905) (GH-26907)
(cherry picked from commit 22e7effad571f8e524d2f71ff55bbf2a25306753)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r-- | Lib/test/test_ssl.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index a89768f24b..fab382f43c 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -21,7 +21,6 @@ import pprint import urllib.request import threading import traceback -import asyncore import weakref import platform import sysconfig @@ -31,6 +30,11 @@ try: except ImportError: ctypes = None +import warnings +with warnings.catch_warnings(): + warnings.simplefilter('ignore', DeprecationWarning) + import asyncore + ssl = import_helper.import_module("ssl") import _ssl |