diff options
Diffstat (limited to 'Lib/aifc.py')
-rw-r--r-- | Lib/aifc.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/aifc.py b/Lib/aifc.py index 49a456a..e51e8f8 100644 --- a/Lib/aifc.py +++ b/Lib/aifc.py @@ -915,7 +915,10 @@ def open(f, mode=None): else: raise Error("mode must be 'r', 'rb', 'w', or 'wb'") -openfp = open # B/W compatibility +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 |