jorisvandenbossche commented on code in PR #51309:
URL: https://github.com/apache/arrow/pull/51309#discussion_r4002984053
##########
python/pyarrow/tests/test_dlpack.py:
##########
@@ -270,10 +270,11 @@ def immutable_tensor():
@pytest.mark.parametrize('max_version', [None, (0, 8)])
def test_dlpack_legacy_capsule_immutable_tensor(max_version):
tensor = immutable_tensor()
- with pytest.raises(NotImplementedError,
- match="Legacy DLPack support is not implemented "
- "for immutable tensors"):
- tensor.__dlpack__(max_version=max_version)
+ with pytest.warns(DeprecationWarning, match="unversioned DLPack capsule"):
+ with pytest.raises(NotImplementedError,
+ match="Legacy DLPack support is not implemented "
+ "for immutable tensors"):
+ tensor.__dlpack__(max_version=max_version)
Review Comment:
This seems to be an issue with our own implementation? (we should not be
raising both a warning an error at the same time? assuming they both from our
code)
cc @AlenkaF
--
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]