Copilot commented on code in PR #51404:
URL: https://github.com/apache/arrow/pull/51404#discussion_r4071904121


##########
python/pyarrow/tests/test_dlpack.py:
##########
@@ -335,24 +341,24 @@ def test_dlpack_not_supported():
     arr = pa.array([1, None, 3])
     with pytest.raises(TypeError, match="Can only use DLPack "
                        "on arrays with no nulls."):
-        np.from_dlpack(arr)
+        np.from_dlpack(DLPackForwarder(arr, max_version=(1, 0)))

Review Comment:
   This test is not gated to NumPy >= 2.1, but the new `max_version=(1, 0)` 
forces the versioned DLPack protocol. NumPy 2.0 is still supported by 
`python/pyproject.toml:25` and its `from_dlpack` consumer does not support this 
protocol, so these cases can fail with a capsule/type error instead of the 
intended Arrow `TypeError`. Keep the original `np.from_dlpack(arr)` calls and 
filter the expected deprecation warning (for all four cases), or add an 
explicit version guard if versioned consumption is what this test intends.



-- 
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