Copilot commented on code in PR #54690:
URL: https://github.com/apache/arrow/pull/54690#discussion_r4336641478
##########
python/pyarrow/tests/test_dlpack.py:
##########
@@ -331,28 +334,36 @@ def test_dlpack_copy_is_writeable():
assert arr.to_pylist() == [1, 2, 3]
+def from_dlpack_split(obj):
+ if Version(np.__version__) < Version("2.1.0"):
+ max_version = None
+ else:
+ max_version = (1, 0)
+ return np.from_dlpack(DLPackForwarder(obj, max_version=max_version))
+
+
def test_dlpack_not_supported():
Review Comment:
For NumPy <2.1, `max_version=None` still emits the legacy-capsule warning
before `Array.__dlpack__` raises the expected export error. Wheel tests use
NumPy 2.0 on Python <=3.12 (`python/requirements-wheel-test.txt:15`), so
`test_dlpack_not_supported` still produces the warnings this PR targets and
fails when deprecations are treated as errors. Add a targeted warning filter to
that test, as with the other legacy tests.
--
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]