File tree 9 files changed +51
-16
lines changed
9 files changed +51
-16
lines changed Original file line number Diff line number Diff line change 4
4
from test .support import socket_helper
5
5
from test .support import threading_helper
6
6
7
- import asynchat
8
- import asyncore
9
7
import errno
10
8
import socket
11
9
import sys
14
12
import unittest
15
13
import unittest .mock
16
14
15
+ import warnings
16
+ with warnings .catch_warnings ():
17
+ warnings .simplefilter ('ignore' , DeprecationWarning )
18
+ import asynchat
19
+ import asyncore
20
+
17
21
HOST = socket_helper .HOST
18
22
SERVER_QUIT = b'QUIT\n '
19
23
Original file line number Diff line number Diff line change 1
- import asyncore
2
1
import unittest
3
2
import select
4
3
import os
19
18
if support .PGO :
20
19
raise unittest .SkipTest ("test is not helpful for PGO" )
21
20
21
+ import warnings
22
+ with warnings .catch_warnings ():
23
+ warnings .simplefilter ('ignore' , DeprecationWarning )
24
+ import asyncore
25
+
22
26
23
27
HAS_UNIX_SOCKETS = hasattr (socket , 'AF_UNIX' )
24
28
Original file line number Diff line number Diff line change 4
4
# environment
5
5
6
6
import ftplib
7
- import asyncore
8
- import asynchat
9
7
import socket
10
8
import io
11
9
import errno
24
22
from test .support import warnings_helper
25
23
from test .support .socket_helper import HOST , HOSTv6
26
24
25
+ import warnings
26
+ with warnings .catch_warnings ():
27
+ warnings .simplefilter ('ignore' , DeprecationWarning )
28
+ import asyncore
29
+ import asynchat
30
+
31
+
27
32
TIMEOUT = support .LOOPBACK_TIMEOUT
28
33
DEFAULT_ENCODING = 'utf-8'
29
34
# the dummy data returned by server over the data channel when
Original file line number Diff line number Diff line change 54
54
import warnings
55
55
import weakref
56
56
57
- import asyncore
58
57
from http .server import HTTPServer , BaseHTTPRequestHandler
59
- import smtpd
60
58
from urllib .parse import urlparse , parse_qs
61
59
from socketserver import (ThreadingUDPServer , DatagramRequestHandler ,
62
60
ThreadingTCPServer , StreamRequestHandler )
63
61
62
+ with warnings .catch_warnings ():
63
+ warnings .simplefilter ('ignore' , DeprecationWarning )
64
+ import asyncore
65
+ import smtpd
66
+
64
67
try :
65
68
import win32evtlog , win32evtlogutil , pywintypes
66
69
except ImportError :
Original file line number Diff line number Diff line change 2
2
# does add tests for a few functions which have been determined to be more
3
3
# portable than they had been thought to be.
4
4
5
- import asynchat
6
- import asyncore
7
5
import codecs
8
6
import contextlib
9
7
import decimal
39
37
from test .support import warnings_helper
40
38
from platform import win32_is_iot
41
39
40
+ with warnings .catch_warnings ():
41
+ warnings .simplefilter ('ignore' , DeprecationWarning )
42
+ import asynchat
43
+ import asyncore
44
+
42
45
try :
43
46
import resource
44
47
except ImportError :
Original file line number Diff line number Diff line change 4
4
# a real test suite
5
5
6
6
import poplib
7
- import asyncore
8
- import asynchat
9
7
import socket
10
8
import os
11
9
import errno
17
15
from test .support import socket_helper
18
16
from test .support import threading_helper
19
17
18
+ import warnings
19
+ with warnings .catch_warnings ():
20
+ warnings .simplefilter ('ignore' , DeprecationWarning )
21
+ import asynchat
22
+ import asyncore
23
+
20
24
HOST = socket_helper .HOST
21
25
PORT = 0
22
26
Original file line number Diff line number Diff line change 5
5
from test .support import warnings_helper
6
6
import socket
7
7
import 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
10
14
11
15
12
16
class DummyServer (smtpd .SMTPServer ):
Original file line number Diff line number Diff line change 1
- import asyncore
2
1
import base64
3
2
import email .mime .text
4
3
from email .message import EmailMessage
7
6
import hashlib
8
7
import hmac
9
8
import socket
10
- import smtpd
11
9
import smtplib
12
10
import io
13
11
import re
25
23
from test .support import threading_helper
26
24
from unittest .mock import Mock
27
25
26
+ import warnings
27
+ with warnings .catch_warnings ():
28
+ warnings .simplefilter ('ignore' , DeprecationWarning )
29
+ import asyncore
30
+ import smtpd
31
+
28
32
HOST = socket_helper .HOST
29
33
30
34
if sys .platform == 'darwin' :
Original file line number Diff line number Diff line change 21
21
import urllib .request
22
22
import threading
23
23
import traceback
24
- import asyncore
25
24
import weakref
26
25
import platform
27
26
import sysconfig
31
30
except ImportError :
32
31
ctypes = None
33
32
33
+ import warnings
34
+ with warnings .catch_warnings ():
35
+ warnings .simplefilter ('ignore' , DeprecationWarning )
36
+ import asyncore
37
+
34
38
ssl = import_helper .import_module ("ssl" )
35
39
import _ssl
36
40
You can’t perform that action at this time.
0 commit comments