diff options
Diffstat (limited to 'Lib/sunau.py')
-rw-r--r-- | Lib/sunau.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/sunau.py b/Lib/sunau.py index 0473e9e..dbad3db 100644 --- a/Lib/sunau.py +++ b/Lib/sunau.py @@ -104,6 +104,7 @@ is destroyed. """ from collections import namedtuple +import warnings _sunau_params = namedtuple('_sunau_params', 'nchannels sampwidth framerate nframes comptype compname') @@ -522,4 +523,7 @@ def open(f, mode=None): else: raise Error("mode must be 'r', 'rb', 'w', or 'wb'") -openfp = open +def openfp(f, mode=None): + warnings.warn("sunau.openfp is deprecated since Python 3.7. " + "Use sunau.open instead.", DeprecationWarning, stacklevel=2) + return open(f, mode=mode) |