kylebarron commented on code in PR #9594:
URL: https://github.com/apache/arrow-rs/pull/9594#discussion_r3004995827


##########
arrow-pyarrow/src/lib.rs:
##########
@@ -273,21 +245,11 @@ impl FromPyArrow for ArrayData {
         // method, so prefer it over _export_to_c.
         // See 
https://arrow.apache.org/docs/format/CDataInterface/PyCapsuleInterface.html
         if value.hasattr("__arrow_c_array__")? {
-            let tuple = value.getattr("__arrow_c_array__")?.call0()?;
-
-            if !tuple.is_instance_of::<PyTuple>() {
-                return Err(PyTypeError::new_err(
-                    "Expected __arrow_c_array__ to return a tuple.",
-                ));
-            }

Review Comment:
   fwiw previously there was a nice user-facing error here, while now the error 
generated from `extract` will be much more obtuse. Ideally this exception will 
never be raised except if the producer doesn't follow the spec correctly.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to