diff options
author | Brett Cannon <brett@python.org> | 2022-04-05 12:05:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-05 12:05:48 -0700 |
commit | c1d93b6411f975d67e43942f1a2745a22983c18c (patch) | |
tree | cccdd369da191fa03268967013d60369ab48fcdf /Lib/sndhdr.py | |
parent | 944f09adfcc59f54432ac2947cf95f3465d90e1e (diff) | |
download | cpython-c1d93b6411f975d67e43942f1a2745a22983c18c.tar.gz cpython-c1d93b6411f975d67e43942f1a2745a22983c18c.zip |
bpo-47061: deprecate the `aifc` module (GH-32134)
Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Lib/sndhdr.py')
-rw-r--r-- | Lib/sndhdr.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/sndhdr.py b/Lib/sndhdr.py index 96595c69744..a63b6fd2022 100644 --- a/Lib/sndhdr.py +++ b/Lib/sndhdr.py @@ -33,6 +33,7 @@ explicitly given directories. __all__ = ['what', 'whathdr'] from collections import namedtuple +import warnings SndHeaders = namedtuple('SndHeaders', 'filetype framerate nchannels nframes sampwidth') @@ -73,7 +74,9 @@ def whathdr(filename): tests = [] def test_aifc(h, f): - import aifc + with warnings.catch_warnings(): + warnings.simplefilter('ignore', category=DeprecationWarning) + import aifc if not h.startswith(b'FORM'): return None if h[8:12] == b'AIFC': |