The Rust client has SegmentClient::delete_segments (core/common/src/traits/segment_client.rs), but the Python SDK has no binding for it. It is listed as Easy in the Python API alignment tracking issue, #3893.
What to do
- Add
delete_segments(stream_id, topic_id, partition_id, segments_count) to foreign/python/src/client.rs. delete_partitions in the same file is the model to copy: it takes the same stream, topic and partition arguments, and this adds one u32 count.
- Regenerate
foreign/python/apache_iggy.pyi by running cargo run --bin stub_gen from foreign/python, and commit the result. CI fails if the stub is out of date.
- Add
foreign/python/tests/test_segment.py, following the setup and teardown in test_partition.py.
Done when
await client.delete_segments(stream_id, topic_id, partition_id, segments_count) returns None against a running server, and the new test passes.
Part of #3893.
The Rust client has
SegmentClient::delete_segments(core/common/src/traits/segment_client.rs), but the Python SDK has no binding for it. It is listed as Easy in the Python API alignment tracking issue, #3893.What to do
delete_segments(stream_id, topic_id, partition_id, segments_count)toforeign/python/src/client.rs.delete_partitionsin the same file is the model to copy: it takes the same stream, topic and partition arguments, and this adds oneu32count.foreign/python/apache_iggy.pyiby runningcargo run --bin stub_genfromforeign/python, and commit the result. CI fails if the stub is out of date.foreign/python/tests/test_segment.py, following the setup and teardown intest_partition.py.Done when
await client.delete_segments(stream_id, topic_id, partition_id, segments_count)returnsNoneagainst a running server, and the new test passes.Part of #3893.