mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
gh-92169: Use warnings_helper.import_deprecated() to import deprecated modules uniformly in tests (GH-92170)
This commit is contained in:
parent
c1767fce52
commit
9b027d4cea
10 changed files with 33 additions and 41 deletions
|
@ -12,7 +12,6 @@ from test.support import warnings_helper
|
|||
import socket
|
||||
import select
|
||||
import time
|
||||
import datetime
|
||||
import enum
|
||||
import gc
|
||||
import os
|
||||
|
@ -30,10 +29,9 @@ try:
|
|||
except ImportError:
|
||||
ctypes = None
|
||||
|
||||
import warnings
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter('ignore', DeprecationWarning)
|
||||
import asyncore
|
||||
|
||||
asyncore = warnings_helper.import_deprecated('asyncore')
|
||||
|
||||
|
||||
ssl = import_helper.import_module("ssl")
|
||||
import _ssl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue