aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2021-06-25 00:20:40 +0100
committerGitHub <noreply@github.com>2021-06-25 00:20:40 +0100
commit22e7effad571f8e524d2f71ff55bbf2a25306753 (patch)
treece51b9a9501bc006e8f11086924b61ddb31a6af4 /Lib/test/test_logging.py
parent8488b85c6397fe58f17fc00e047044c959ac0b04 (diff)
downloadcpython-22e7effad571f8e524d2f71ff55bbf2a25306753.tar.gz
cpython-22e7effad571f8e524d2f71ff55bbf2a25306753.zip
bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in tests (GH-26905)
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 6d111908e7c..48ed2eb2fc6 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -54,13 +54,16 @@ import unittest
import warnings
import weakref
-import asyncore
from http.server import HTTPServer, BaseHTTPRequestHandler
-import smtpd
from urllib.parse import urlparse, parse_qs
from socketserver import (ThreadingUDPServer, DatagramRequestHandler,
ThreadingTCPServer, StreamRequestHandler)
+with warnings.catch_warnings():
+ warnings.simplefilter('ignore', DeprecationWarning)
+ import asyncore
+ import smtpd
+
try:
import win32evtlog, win32evtlogutil, pywintypes
except ImportError: