diff options
author | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2022-05-03 07:17:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 07:17:54 (GMT) |
commit | 9b027d4cea57e98c76f5176cc3188dc81603356c (patch) | |
tree | 1306b7c7cc75ce99c311ec8f8085e2e9b145de82 /Lib/test/test_logging.py | |
parent | c1767fce521f5d4f175082d0747cfa48542aea3a (diff) | |
download | cpython-9b027d4cea57e98c76f5176cc3188dc81603356c.zip cpython-9b027d4cea57e98c76f5176cc3188dc81603356c.tar.gz cpython-9b027d4cea57e98c76f5176cc3188dc81603356c.tar.bz2 |
gh-92169: Use warnings_helper.import_deprecated() to import deprecated modules uniformly in tests (GH-92170)
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r-- | Lib/test/test_logging.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 7555f05..5d4dded 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -60,10 +60,10 @@ 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 + +asyncore = warnings_helper.import_deprecated('asyncore') +smtpd = warnings_helper.import_deprecated('smtpd') + try: import win32evtlog, win32evtlogutil, pywintypes |