8000 TYP: remove expired ``tostring`` methods · numpy/numpy@e7e0e6f · GitHub
[go: up one dir, main page]

Skip to content

Commit e7e0e6f

Browse files
jorenhamcharris
authored andcommitted
TYP: remove expired tostring methods
1 parent 3ef41f7 commit e7e0e6f

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

numpy/lib/_user_array_impl.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ from types import EllipsisType
22
from typing import Any, Generic, Self, SupportsIndex, TypeAlias, overload
33

44
from _typeshed import Incomplete
5-
from typing_extensions import TypeVar, deprecated, override
5+
from typing_extensions import TypeVar, override
66

77
import numpy as np
88
import numpy.typing as npt
@@ -220,8 +220,6 @@ class container(Generic[_ShapeT_co, _DTypeT_co]):
220220

221221
#
222222
def copy(self, /) -> Self: ...
223-
@deprecated("tostring() is deprecated. Use tobytes() instead.")
224-
def tostring(self, /) -> bytes: ...
225223
def tobytes(self, /) -> bytes: ...
226224
def byteswap(self, /) -> Self: ...
227225
def astype(self, /, typecode: _DTypeLike[_ScalarT]) -> container[_ShapeT_co, np.dtype[_ScalarT]]: ...

numpy/ma/core.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ from collections.abc import Sequence
55
from typing import Any, Literal, Self, SupportsIndex, TypeAlias, overload
66

77
from _typeshed import Incomplete
8-
from typing_extensions import TypeIs, TypeVar, deprecated
8+
from typing_extensions import TypeIs, TypeVar
99

1010
import numpy as np
1111
from numpy import (
@@ -1057,8 +1057,6 @@ class MaskedArray(ndarray[_ShapeT_co, _DTypeT_co]):
10571057
def toflex(self) -> Incomplete: ...
10581058
def torecords(self) -> Incomplete: ...
10591059
def tolist(self, fill_value: Incomplete | None = None) -> Incomplete: ...
1060-
@deprecated("tostring() is deprecated. Use tobytes() instead.")
1061-
def tostring(self, /, fill_value: Incomplete | None = None, order: _OrderKACF = "C") -> bytes: ... # type: ignore[override]
10621060
def tobytes(self, /, fill_value: Incomplete | None = None, order: _OrderKACF = "C") -> bytes: ... # type: ignore[override]
10631061
def tofile(self, /, fid: Incomplete, sep: str = "", format: str = "%s") -> Incomplete: ...
10641062

0 commit comments

Comments
 (0)
0