diff options
Diffstat (limited to 'contrib/tools/python3/Lib/wave.py')
| -rw-r--r-- | contrib/tools/python3/Lib/wave.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/contrib/tools/python3/Lib/wave.py b/contrib/tools/python3/Lib/wave.py index 4b0c683f6b5..b8476e26486 100644 --- a/contrib/tools/python3/Lib/wave.py +++ b/contrib/tools/python3/Lib/wave.py @@ -21,9 +21,9 @@ This returns an instance of a class with the following public methods: getparams() -- returns a namedtuple consisting of all of the above in the above order getmarkers() -- returns None (for compatibility with the - aifc module) + old aifc module) getmark(id) -- raises an error since the mark does not - exist (for compatibility with the aifc module) + exist (for compatibility with the old aifc module) readframes(n) -- returns at most n frames of audio rewind() -- rewind to the beginning of the audio stream setpos(pos) -- seek to the specified position @@ -342,9 +342,13 @@ class Wave_read: self.getcomptype(), self.getcompname()) def getmarkers(self): + import warnings + warnings._deprecated("Wave_read.getmarkers", remove=(3, 15)) return None def getmark(self, id): + import warnings + warnings._deprecated("Wave_read.getmark", remove=(3, 15)) raise Error('no marks') def setpos(self, pos): @@ -437,6 +441,8 @@ class Wave_write: _datawritten -- the size of the audio samples actually written """ + _file = None + def __init__(self, f): self._i_opened_the_file = None if isinstance(f, str): @@ -548,12 +554,18 @@ class Wave_write: self._nframes, self._comptype, self._compname) def setmark(self, id, pos, name): + import warnings + warnings._deprecated("Wave_write.setmark", remove=(3, 15)) raise Error('setmark() not supported') def getmark(self, id): + import warnings + warnings._deprecated("Wave_write.getmark", remove=(3, 15)) raise Error('no marks') def getmarkers(self): + import warnings + warnings._deprecated("Wave_write.getmarkers", remove=(3, 15)) return None def tell(self): |
