This is an automated email from the ASF dual-hosted git repository.
gkoszyk pushed a commit to branch io_uring_final
in repository https://gitbox.apache.org/repos/asf/iggy.git
The following commit(s) were added to refs/heads/io_uring_final by this push:
new 9e7ba07b0 feat(io_uring): remove deprecated stream_id and topic_id
parameters from API calls (#2303)
9e7ba07b0 is described below
commit 9e7ba07b01471bede803b9472da5e05fd3b8f92e
Author: Krishna Vishal <[email protected]>
AuthorDate: Fri Oct 31 15:39:13 2025 +0530
feat(io_uring): remove deprecated stream_id and topic_id parameters from
API calls (#2303)
---
foreign/python/python_examples/consumer.py | 2 +-
foreign/python/python_examples/producer.py | 2 +-
foreign/python/src/client.rs | 3 +--
foreign/python/tests/test_iggy_sdk.py | 13 +++++++------
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/foreign/python/python_examples/consumer.py
b/foreign/python/python_examples/consumer.py
index 2583f2c9c..1c20280eb 100644
--- a/foreign/python/python_examples/consumer.py
+++ b/foreign/python/python_examples/consumer.py
@@ -23,7 +23,7 @@ from loguru import logger
STREAM_NAME = "sample-stream"
TOPIC_NAME = "sample-topic"
-PARTITION_ID = 1
+PARTITION_ID = 0
async def main():
diff --git a/foreign/python/python_examples/producer.py
b/foreign/python/python_examples/producer.py
index 1b233a708..acf578ed2 100644
--- a/foreign/python/python_examples/producer.py
+++ b/foreign/python/python_examples/producer.py
@@ -24,7 +24,7 @@ from loguru import logger
STREAM_NAME = "sample-stream"
TOPIC_NAME = "sample-topic"
-PARTITION_ID = 1
+PARTITION_ID = 0
async def main():
diff --git a/foreign/python/src/client.rs b/foreign/python/src/client.rs
index 93af01ce4..462cc37e3 100644
--- a/foreign/python/src/client.rs
+++ b/foreign/python/src/client.rs
@@ -148,7 +148,7 @@ impl IggyClient {
let inner = self.inner.clone();
future_into_py(py, async move {
inner
- .create_stream(&name, stream_id)
+ .create_stream(&name)
.await
.map_err(|e| PyErr::new::<pyo3::exceptions::PyRuntimeError,
_>(format!("{e:?}")))?;
Ok(())
@@ -211,7 +211,6 @@ impl IggyClient {
partitions_count,
compression_algorithm,
replication_factor,
- topic_id,
IggyExpiry::NeverExpire,
MaxTopicSize::ServerDefault,
)
diff --git a/foreign/python/tests/test_iggy_sdk.py
b/foreign/python/tests/test_iggy_sdk.py
index 604cd6bc2..142e9ce62 100644
--- a/foreign/python/tests/test_iggy_sdk.py
+++ b/foreign/python/tests/test_iggy_sdk.py
@@ -79,7 +79,7 @@ class TestStreamOperations:
stream = await iggy_client.get_stream(unique_stream_name)
assert stream is not None
assert stream.name == unique_stream_name
- assert stream.id > 0
+ assert stream.id >= 0
@pytest.mark.asyncio
async def test_list_streams(self, iggy_client: IggyClient,
unique_stream_name):
@@ -91,6 +91,7 @@ class TestStreamOperations:
stream = await iggy_client.get_stream(unique_stream_name)
assert stream is not None
assert stream.name == unique_stream_name
+
assert stream.id > 0
assert stream.topics_count == 0 # New stream has no topics
@@ -125,7 +126,7 @@ class TestTopicOperations:
topic = await iggy_client.get_topic(stream_name, topic_name)
assert topic is not None
assert topic.name == topic_name
- assert topic.id > 0
+ assert topic.id >= 0
assert topic.partitions_count == 2
@pytest.mark.asyncio
@@ -144,7 +145,7 @@ class TestTopicOperations:
topic = await iggy_client.get_topic(stream_name, topic_name)
assert topic is not None
assert topic.name == topic_name
- assert topic.id > 0
+ assert topic.id >= 0
assert topic.partitions_count == 1
@@ -158,7 +159,7 @@ class TestMessageOperations:
return {
"stream": f"msg-stream-{unique_id}",
"topic": f"msg-topic-{unique_id}",
- "partition_id": 1,
+ "partition_id": 0,
"messages": [f"Test message {i} - {unique_id}" for i in range(1,
4)],
}
@@ -303,7 +304,7 @@ class TestPollingStrategies:
return {
"stream": f"poll-stream-{unique_id}",
"topic": f"poll-topic-{unique_id}",
- "partition_id": 1,
+ "partition_id": 0,
"messages": [f"Polling test {i} - {unique_id}" for i in range(5)],
}
@@ -427,7 +428,7 @@ class TestConsumerGroup:
"consumer": f"consumer-group-consumer-{unique_id}",
"stream": f"consumer-group-stream-{unique_id}",
"topic": f"consumer-group-topic-{unique_id}",
- "partition_id": 1,
+ "partition_id": 0,
"messages": [f"Consumer group test {i} - {unique_id}" for i in
range(5)],
}