mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +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
|
@ -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':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue