Skip to content

Commit d66d496

Browse files
committed
Replace deprecated _import_from_c_capsule method with from_stream for RecordBatchReader in test_arrow_c_stream_schema_selection
1 parent 57d4162 commit d66d496

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

python/tests/test_dataframe.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,11 +1698,8 @@ def test_arrow_c_stream_schema_selection(fail_collect):
16981698
capsule_new = ctypes.pythonapi.PyCapsule_New
16991699
capsule_new.restype = ctypes.py_object
17001700
capsule_new.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_void_p]
1701-
schema_capsule = capsule_new(ctypes.c_void_p(address), b"arrow_schema", None)
17021701

1703-
reader = pa.RecordBatchReader._import_from_c_capsule(
1704-
df.__arrow_c_stream__(schema_capsule)
1705-
)
1702+
reader = pa.RecordBatchReader.from_stream(df, schema=requested_schema)
17061703

17071704
assert reader.schema == requested_schema
17081705

0 commit comments

Comments
 (0)