diff --git a/pyarrow-stubs/__lib_pxi/io.pyi b/pyarrow-stubs/__lib_pxi/io.pyi index f2d483a..488df00 100644 --- a/pyarrow-stubs/__lib_pxi/io.pyi +++ b/pyarrow-stubs/__lib_pxi/io.pyi @@ -117,6 +117,7 @@ class Buffer(_Weakrefable): def equals(self, other: Self) -> bool: ... def __reduce_ex__(self, protocol: SupportsIndex) -> str | tuple[Any, ...]: ... def to_pybytes(self) -> bytes: ... + def __buffer__(self, flags: int, /) -> memoryview: ... class ResizableBuffer(Buffer): def resize(self, new_size: int, shrink_to_fit: bool = False) -> None: ... diff --git a/pyarrow-stubs/_stubs_typing.pyi b/pyarrow-stubs/_stubs_typing.pyi index f2f28a7..29946e8 100644 --- a/pyarrow-stubs/_stubs_typing.pyi +++ b/pyarrow-stubs/_stubs_typing.pyi @@ -53,7 +53,8 @@ FilterTuple: TypeAlias = ( class Buffer(Protocol): def __buffer__(self, flags: int, /) -> memoryview: ... -SupportPyBuffer: TypeAlias = Any +class SupportPyBuffer(Protocol): + def __buffer__(self, flags: int, /) -> memoryview: ... class SupportArrowStream(Protocol): def __arrow_c_stream__(self, requested_schema=None) -> Any: ...