diff --git a/docs/source/format/CDataInterface/PyCapsuleInterface.rst b/docs/source/format/CDataInterface/PyCapsuleInterface.rst index 5f6dafa361ea1..20f8949435dfa 100644 --- a/docs/source/format/CDataInterface/PyCapsuleInterface.rst +++ b/docs/source/format/CDataInterface/PyCapsuleInterface.rst @@ -151,7 +151,7 @@ required to implement the protocol. """ Export array as a pair of PyCapsules for the ArrowSchema and ArrowArray. - The capsule will have a name of "arrowarray". + The ArrowArray capsule will have a name of "arrowarray". If requested_schema is passed, the callee should attempt to provide the data in the requested schema. However, this is best-effort, and the diff --git a/python/pyarrow/types.pxi b/python/pyarrow/types.pxi index b755eaefdd9ac..00d1f7158306b 100644 --- a/python/pyarrow/types.pxi +++ b/python/pyarrow/types.pxi @@ -385,7 +385,7 @@ cdef class DataType(_Weakrefable): shared_ptr[CDataType] c_type if not cpython.PyCapsule_IsValid(schema, 'arrowschema'): - raise ValueError( + raise TypeError( "Not an ArrowSchema object" ) c_schema = cpython.PyCapsule_GetPointer(schema, 'arrowschema')