Skip to content

Commit

Permalink
feat: support pa.Buffer buffer protocol (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
zen-xu authored Sep 21, 2024
1 parent 9b42e32 commit 76d8dd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyarrow-stubs/__lib_pxi/io.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
Expand Down
3 changes: 2 additions & 1 deletion pyarrow-stubs/_stubs_typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
Expand Down

0 comments on commit 76d8dd2

Please sign in to comment.