bpo-47061: deprecate the aifc module (GH-32134)

Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
Brett Cannon 2022-04-05 12:05:48 -07:00 committed by GitHub
parent 944f09adfc
commit c1d93b6411
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 95 additions and 6 deletions

View file

@ -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':