File tree Expand file tree Collapse file tree 9 files changed +51
-16
lines changed
Expand file tree Collapse file tree 9 files changed +51
-16
lines changed Original file line number Diff line number Diff line change 44from test .support import socket_helper
55from test .support import threading_helper
66
7- import asynchat
8- import asyncore
97import errno
108import socket
119import sys
1412import unittest
1513import unittest .mock
1614
15+ import warnings
16+ with warnings .catch_warnings ():
17+ warnings .simplefilter ('ignore' , DeprecationWarning )
18+ import asynchat
19+ import asyncore
20+
1721HOST = socket_helper .HOST
1822SERVER_QUIT = b'QUIT\n '
1923
Original file line number Diff line number Diff line change 1- import asyncore
21import unittest
32import select
43import os
1918if support .PGO :
2019 raise unittest .SkipTest ("test is not helpful for PGO" )
2120
21+ import warnings
22+ with warnings .catch_warnings ():
23+ warnings .simplefilter ('ignore' , DeprecationWarning )
24+ import asyncore
25+
2226
2327HAS_UNIX_SOCKETS = hasattr (socket , 'AF_UNIX' )
2428
Original file line number Diff line number Diff line change 44# environment
55
66import ftplib
7- import asyncore
8- import asynchat
97import socket
108import io
119import errno
2422from test .support import warnings_helper
2523from test .support .socket_helper import HOST , HOSTv6
2624
25+ import warnings
26+ with warnings .catch_warnings ():
27+ warnings .simplefilter ('ignore' , DeprecationWarning )
28+ import asyncore
29+ import asynchat
30+
31+
2732TIMEOUT = support .LOOPBACK_TIMEOUT
2833DEFAULT_ENCODING = 'utf-8'
2934# the dummy data returned by server over the data channel when
Original file line number Diff line number Diff line change 5454import warnings
5555import weakref
5656
57- import asyncore
5857from http .server import HTTPServer , BaseHTTPRequestHandler
59- import smtpd
6058from urllib .parse import urlparse , parse_qs
6159from socketserver import (ThreadingUDPServer , DatagramRequestHandler ,
6260 ThreadingTCPServer , StreamRequestHandler )
6361
62+ with warnings .catch_warnings ():
63+ warnings .simplefilter ('ignore' , DeprecationWarning )
64+ import asyncore
65+ import smtpd
66+
6467try :
6568 import win32evtlog , win32evtlogutil , pywintypes
6669except ImportError :
Original file line number Diff line number Diff line change 22# does add tests for a few functions which have been determined to be more
33# portable than they had been thought to be.
44
5- import asynchat
6- import asyncore
75import codecs
86import contextlib
97import decimal
3937from test .support import warnings_helper
4038from platform import win32_is_iot
4139
40+ with warnings .catch_warnings ():
41+ warnings .simplefilter ('ignore' , DeprecationWarning )
42+ import asynchat
43+ import asyncore
44+
4245try :
4346 import resource
4447except ImportError :
Original file line number Diff line number Diff line change 44# a real test suite
55
66import poplib
7- import asyncore
8- import asynchat
97import socket
108import os
119import errno
1715from test .support import socket_helper
1816from test .support import threading_helper
1917
18+ import warnings
19+ with warnings .catch_warnings ():
20+ warnings .simplefilter ('ignore' , DeprecationWarning )
21+ import asynchat
22+ import asyncore
23+
2024HOST = socket_helper .HOST
2125PORT = 0
2226
Original file line number Diff line number Diff line change 55from test .support import warnings_helper
66import socket
77import io
8- import smtpd
9- import asyncore
8+
9+ import warnings
10+ with warnings .catch_warnings ():
11+ warnings .simplefilter ('ignore' , DeprecationWarning )
12+ import smtpd
13+ import asyncore
1014
1115
1216class DummyServer (smtpd .SMTPServer ):
Original file line number Diff line number Diff line change 1- import asyncore
21import base64
32import email .mime .text
43from email .message import EmailMessage
76import hashlib
87import hmac
98import socket
10- import smtpd
119import smtplib
1210import io
1311import re
2523from test .support import threading_helper
2624from unittest .mock import Mock
2725
26+ import warnings
27+ with warnings .catch_warnings ():
28+ warnings .simplefilter ('ignore' , DeprecationWarning )
29+ import asyncore
30+ import smtpd
31+
2832HOST = socket_helper .HOST
2933
3034if sys .platform == 'darwin' :
Original file line number Diff line number Diff line change 2121import urllib .request
2222import threading
2323import traceback
24- import asyncore
2524import weakref
2625import platform
2726import sysconfig
3130except ImportError :
3231 ctypes = None
3332
33+ import warnings
34+ with warnings .catch_warnings ():
35+ warnings .simplefilter ('ignore' , DeprecationWarning )
36+ import asyncore
37+
3438ssl = import_helper .import_module ("ssl" )
3539import _ssl
3640
You can’t perform that action at this time.
0 commit comments