summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kafka/client_async.py3
-rw-r--r--kafka/conn.py1
-rw-r--r--kafka/consumer/group.py1
-rw-r--r--kafka/producer/sender.py2
4 files changed, 3 insertions, 4 deletions
diff --git a/kafka/client_async.py b/kafka/client_async.py
index 80e8494..f6fe829 100644
--- a/kafka/client_async.py
+++ b/kafka/client_async.py
@@ -28,7 +28,8 @@ from .metrics import AnonMeasurable
from .metrics.stats import Avg, Count, Rate
from .metrics.stats.rate import TimeUnit
from .protocol.metadata import MetadataRequest
-from .protocol.produce import ProduceRequest
+# Although this looks unused, it actually monkey-patches socket.socketpair()
+# and should be left in as long as we're using socket.socketpair() in this file
from .vendor import socketpair
from .version import __version__
diff --git a/kafka/conn.py b/kafka/conn.py
index 949fca5..af01efa 100644
--- a/kafka/conn.py
+++ b/kafka/conn.py
@@ -19,7 +19,6 @@ from kafka.protocol.admin import SaslHandShakeRequest
from kafka.protocol.commit import GroupCoordinatorResponse, OffsetFetchRequest
from kafka.protocol.frame import KafkaBytes
from kafka.protocol.metadata import MetadataRequest
-from kafka.protocol.fetch import FetchRequest
from kafka.protocol.types import Int32
from kafka.version import __version__
diff --git a/kafka/consumer/group.py b/kafka/consumer/group.py
index 2de254d..a629821 100644
--- a/kafka/consumer/group.py
+++ b/kafka/consumer/group.py
@@ -3,7 +3,6 @@ from __future__ import absolute_import
import copy
import logging
import socket
-import sys
import time
from kafka.errors import KafkaConfigurationError, UnsupportedVersionError
diff --git a/kafka/producer/sender.py b/kafka/producer/sender.py
index ad59050..679efb0 100644
--- a/kafka/producer/sender.py
+++ b/kafka/producer/sender.py
@@ -10,7 +10,7 @@ from kafka.vendor import six
from .. import errors as Errors
from ..metrics.measurable import AnonMeasurable
-from ..metrics.stats import Avg, Count, Max, Rate
+from ..metrics.stats import Avg, Max, Rate
from ..protocol.produce import ProduceRequest
from ..structs import TopicPartition
from ..version import __version__