Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support pa.Buffer buffer protocol #99

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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