Skip to content

Commit

Permalink
GH-35531: [Python] C Data Interface PyCapsule Protocol (#37797)
Browse files Browse the repository at this point in the history
### Rationale for this change

### What changes are included in this PR?

* A new specification for Arrow PyCapsules and related dunder methods
* Implementing the dunder methods for `DataType`, `Field`, `Schema`, `Array`, `RecordBatch`, `Table`, and `RecordBatchReader`.

### Are these changes tested?

Yes, I've added various roundtrip tests for each of the types.

### Are there any user-facing changes?

This introduces some new APIs and documents them.

* Closes: #34031
* Closes: #35531

Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
  • Loading branch information
wjones127 authored and raulcd committed Oct 18, 2023
1 parent 1b3f498 commit bd61239
Show file tree
Hide file tree
Showing 13 changed files with 1,177 additions and 11 deletions.
11 changes: 11 additions & 0 deletions docs/source/format/CDataInterface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -990,3 +990,14 @@ adaptation cost.


.. _Python buffer protocol: https://www.python.org/dev/peps/pep-3118/

Language-specific protocols
===========================

Some languages may define additional protocols on top of the Arrow C data
interface.

.. toctree::
:maxdepth: 1

CDataInterface/PyCapsuleInterface
Loading

0 comments on commit bd61239

Please sign in to comment.