mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-37320: Remove openfp() of aifc, sunau and wave (GH-14169)
aifc.openfp() alias to aifc.open(), sunau.openfp() alias to sunau.open(), and wave.openfp() alias to wave.open() have been removed. They were deprecated since Python 3.7.
This commit is contained in:
parent
8fac122109
commit
ac7b1a3f32
12 changed files with 29 additions and 69 deletions
|
|
@ -138,7 +138,7 @@ import struct
|
|||
import builtins
|
||||
import warnings
|
||||
|
||||
__all__ = ["Error", "open", "openfp"]
|
||||
__all__ = ["Error", "open"]
|
||||
|
||||
class Error(Exception):
|
||||
pass
|
||||
|
|
@ -920,10 +920,6 @@ def open(f, mode=None):
|
|||
else:
|
||||
raise Error("mode must be 'r', 'rb', 'w', or 'wb'")
|
||||
|
||||
def openfp(f, mode=None):
|
||||
warnings.warn("aifc.openfp is deprecated since Python 3.7. "
|
||||
"Use aifc.open instead.", DeprecationWarning, stacklevel=2)
|
||||
return open(f, mode=mode)
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue