summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/simple.rst5
-rw-r--r--docs/usage.rst2
2 files changed, 3 insertions, 4 deletions
diff --git a/docs/simple.rst b/docs/simple.rst
index 253f543..8192a8b 100644
--- a/docs/simple.rst
+++ b/docs/simple.rst
@@ -129,10 +129,9 @@ SimpleClient (DEPRECATED)
import time
from kafka import SimpleClient
- from kafka.common import (
- LeaderNotAvailableError, NotLeaderForPartitionError,
- ProduceRequestPayload)
+ from kafka.errors import LeaderNotAvailableError, NotLeaderForPartitionError
from kafka.protocol import create_message
+ from kafka.structs import ProduceRequestPayload
kafka = SimpleClient('localhost:9092')
payload = ProduceRequestPayload(topic='my-topic', partition=0,
diff --git a/docs/usage.rst b/docs/usage.rst
index 85fc44f..0ee9894 100644
--- a/docs/usage.rst
+++ b/docs/usage.rst
@@ -56,7 +56,7 @@ KafkaProducer
.. code:: python
from kafka import KafkaProducer
- from kafka.common import KafkaError
+ from kafka.errors import KafkaError
producer = KafkaProducer(bootstrap_servers=['broker1:1234'])