mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in tests (GH-26905) (GH-26907)
(cherry picked from commit 22e7effad5
)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
This commit is contained in:
parent
a80a38ee9a
commit
8bec9fb92f
9 changed files with 51 additions and 16 deletions
|
@ -4,8 +4,6 @@
|
|||
# a real test suite
|
||||
|
||||
import poplib
|
||||
import asyncore
|
||||
import asynchat
|
||||
import socket
|
||||
import os
|
||||
import errno
|
||||
|
@ -17,6 +15,12 @@ from test.support import hashlib_helper
|
|||
from test.support import socket_helper
|
||||
from test.support import threading_helper
|
||||
|
||||
import warnings
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter('ignore', DeprecationWarning)
|
||||
import asynchat
|
||||
import asyncore
|
||||
|
||||
HOST = socket_helper.HOST
|
||||
PORT = 0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue