mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +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
|
|
@ -1,4 +1,3 @@
|
|||
import asyncore
|
||||
import base64
|
||||
import email.mime.text
|
||||
from email.message import EmailMessage
|
||||
|
|
@ -7,7 +6,6 @@
|
|||
import hashlib
|
||||
import hmac
|
||||
import socket
|
||||
import smtpd
|
||||
import smtplib
|
||||
import io
|
||||
import re
|
||||
|
|
@ -25,6 +23,12 @@
|
|||
from test.support import threading_helper
|
||||
from unittest.mock import Mock
|
||||
|
||||
import warnings
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter('ignore', DeprecationWarning)
|
||||
import asyncore
|
||||
import smtpd
|
||||
|
||||
HOST = socket_helper.HOST
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue