Mark deprecated methods as deprecated in wave module (#11001)

This commit is contained in:
Nikita Sobolev
2023-11-17 18:31:00 +03:00
committed by GitHub
parent ca8ad657d3
commit 62ccb32b22

View File

@@ -1,7 +1,7 @@
import sys
from _typeshed import ReadableBuffer, Unused
from typing import IO, Any, BinaryIO, NamedTuple, NoReturn, overload
from typing_extensions import Literal, Self, TypeAlias
from typing_extensions import Literal, Self, TypeAlias, deprecated
if sys.version_info >= (3, 9):
__all__ = ["open", "Error", "Wave_read", "Wave_write"]
@@ -37,7 +37,9 @@ class Wave_read:
def getcomptype(self) -> str: ...
def getcompname(self) -> str: ...
def getparams(self) -> _wave_params: ...
@deprecated("Deprecated in Python 3.13; removal scheduled for Python 3.15")
def getmarkers(self) -> None: ...
@deprecated("Deprecated in Python 3.13; removal scheduled for Python 3.15")
def getmark(self, id: Any) -> NoReturn: ...
def setpos(self, pos: int) -> None: ...
def readframes(self, nframes: int) -> bytes: ...
@@ -59,8 +61,11 @@ class Wave_write:
def getcompname(self) -> str: ...
def setparams(self, params: _wave_params | tuple[int, int, int, int, str, str]) -> None: ...
def getparams(self) -> _wave_params: ...
@deprecated("Deprecated in Python 3.13; removal scheduled for Python 3.15")
def setmark(self, id: Any, pos: Any, name: Any) -> NoReturn: ...
@deprecated("Deprecated in Python 3.13; removal scheduled for Python 3.15")
def getmark(self, id: Any) -> NoReturn: ...
@deprecated("Deprecated in Python 3.13; removal scheduled for Python 3.15")
def getmarkers(self) -> None: ...
def tell(self) -> int: ...
def writeframesraw(self, data: ReadableBuffer) -> None: ...