Skip to content

Commit

Permalink
apacheGH-35531: [Python] C Data Interface PyCapsule Protocol (apache#…
Browse files Browse the repository at this point in the history
…37797)

### 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: apache#34031
* Closes: apache#35531

Authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
  • Loading branch information
wjones127 authored and Jeremy Aguilon committed Oct 23, 2023
1 parent 314234d commit 082feaf
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 082feaf

Please sign in to comment.