mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
bpo-47061: deprecate the aifc
module (GH-32134)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
944f09adfc
commit
c1d93b6411
10 changed files with 95 additions and 6 deletions
|
@ -1,10 +1,18 @@
|
|||
import contextlib
|
||||
import functools
|
||||
import importlib
|
||||
import re
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
|
||||
def import_deprecated(name):
|
||||
"""Import *name* while suppressing DeprecationWarning."""
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter('ignore', category=DeprecationWarning)
|
||||
return importlib.import_module(name)
|
||||
|
||||
|
||||
def check_syntax_warning(testcase, statement, errtext='',
|
||||
*, lineno=1, offset=None):
|
||||
# Test also that a warning is emitted only once.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue