mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in tests (GH-26905)
This commit is contained in:
parent
8488b85c63
commit
22e7effad5
9 changed files with 51 additions and 16 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue