From c1d93b6411f975d67e43942f1a2745a22983c18c Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 5 Apr 2022 12:05:48 -0700 Subject: bpo-47061: deprecate the `aifc` module (GH-32134) Co-authored-by: Christian Heimes --- Lib/sndhdr.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Lib/sndhdr.py') 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': -- cgit v1.2.3