summaryrefslogtreecommitdiffstats
path: root/Lib/aifc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/aifc.py')
-rw-r--r--Lib/aifc.py5
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