summaryrefslogtreecommitdiffstats
path: root/Lib/sndhdr.py
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2017-11-10 16:38:25 (GMT)
committerGitHub <noreply@github.com>2017-11-10 16:38:25 (GMT)
commit9f914a01affc55abe799afc521ce71612bb495a5 (patch)
treeb002fd748ecccf5a416b655a85aef7fb30bd6633 /Lib/sndhdr.py
parent5e0df74b3bc6391e9a7eba0fd84531ed99a78ae9 (diff)
downloadcpython-9f914a01affc55abe799afc521ce71612bb495a5.zip
cpython-9f914a01affc55abe799afc521ce71612bb495a5.tar.gz
cpython-9f914a01affc55abe799afc521ce71612bb495a5.tar.bz2
bpo-31985: Deprecate openfp in aifc, sunau, and wave (#4344)
The openfp functions of aifp, sunau, and wave had pointed to the open function of each module since 1993 as a matter of backwards compatibility. In the case of aifc.openfp, it was both undocumented and untested. This change begins the formal deprecation of those openfp functions, with their removal coming in 3.9. This additionally adds a TODO in test_pyclbr around using aifc.openfp, though it shouldn't be changed until removal in 3.9.
Diffstat (limited to 'Lib/sndhdr.py')
-rw-r--r--Lib/sndhdr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sndhdr.py b/Lib/sndhdr.py
index 7ecafb4..5943531 100644
--- a/Lib/sndhdr.py
+++ b/Lib/sndhdr.py
@@ -160,7 +160,7 @@ def test_wav(h, f):
return None
f.seek(0)
try:
- w = wave.openfp(f, 'r')
+ w = wave.open(f, 'r')
except (EOFError, wave.Error):
return None
return ('wav', w.getframerate(), w.getnchannels(),