from test.support import socket_helper
from test.support import threading_helper
-import asynchat
-import asyncore
import errno
import socket
import sys
import unittest
import unittest.mock
+import warnings
+with warnings.catch_warnings():
+ warnings.simplefilter('ignore', DeprecationWarning)
+ import asynchat
+ import asyncore
+
HOST = socket_helper.HOST
SERVER_QUIT = b'QUIT\n'
-import asyncore
import unittest
import select
import os
if support.PGO:
raise unittest.SkipTest("test is not helpful for PGO")
+import warnings
+with warnings.catch_warnings():
+ warnings.simplefilter('ignore', DeprecationWarning)
+ import asyncore
+
HAS_UNIX_SOCKETS = hasattr(socket, 'AF_UNIX')
# environment
import ftplib
-import asyncore
-import asynchat
import socket
import io
import errno
from test.support import warnings_helper
from test.support.socket_helper import HOST, HOSTv6
+import warnings
+with warnings.catch_warnings():
+ warnings.simplefilter('ignore', DeprecationWarning)
+ import asyncore
+ import asynchat
+
+
TIMEOUT = support.LOOPBACK_TIMEOUT
DEFAULT_ENCODING = 'utf-8'
# the dummy data returned by server over the data channel when
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:
# does add tests for a few functions which have been determined to be more
# portable than they had been thought to be.
-import asynchat
-import asyncore
import codecs
import contextlib
import decimal
from test.support import warnings_helper
from platform import win32_is_iot
+with warnings.catch_warnings():
+ warnings.simplefilter('ignore', DeprecationWarning)
+ import asynchat
+ import asyncore
+
try:
import resource
except ImportError:
# a real test suite
import poplib
-import asyncore
-import asynchat
import socket
import os
import errno
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
from test.support import warnings_helper
import socket
import io
-import smtpd
-import asyncore
+
+import warnings
+with warnings.catch_warnings():
+ warnings.simplefilter('ignore', DeprecationWarning)
+ import smtpd
+ import asyncore
class DummyServer(smtpd.SMTPServer):
-import asyncore
import base64
import email.mime.text
from email.message import EmailMessage
import hashlib
import hmac
import socket
-import smtpd
import smtplib
import io
import re
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':
import urllib.request
import threading
import traceback
-import asyncore
import weakref
import platform
import sysconfig
except ImportError:
ctypes = None
+import warnings
+with warnings.catch_warnings():
+ warnings.simplefilter('ignore', DeprecationWarning)
+ import asyncore
+
ssl = import_helper.import_module("ssl")
import _ssl