summaryrefslogtreecommitdiff
path: root/kafka
diff options
context:
space:
mode:
authorDana Powers <dana.powers@rd.io>2016-01-03 19:50:21 -0800
committerDana Powers <dana.powers@rd.io>2016-01-03 22:10:25 -0800
commit03d37dff5c707599e2f268dccb4cccafbeadd5e3 (patch)
treeabb10310c48cb06a4e01bb47f38e7e4f0cd31240 /kafka
parented8f2212bf879831d38300212aa2251e4c4f0d8c (diff)
downloadkafka-python-03d37dff5c707599e2f268dccb4cccafbeadd5e3.tar.gz
Import queue from six.moves
Diffstat (limited to 'kafka')
-rw-r--r--kafka/consumer/multiprocess.py6
-rw-r--r--kafka/consumer/simple.py5
2 files changed, 3 insertions, 8 deletions
diff --git a/kafka/consumer/multiprocess.py b/kafka/consumer/multiprocess.py
index d0e2920..a348d1a 100644
--- a/kafka/consumer/multiprocess.py
+++ b/kafka/consumer/multiprocess.py
@@ -3,12 +3,10 @@ from __future__ import absolute_import
from collections import namedtuple
import logging
from multiprocessing import Process, Manager as MPManager
-try:
- import queue # python 3
-except ImportError:
- import Queue as queue # python 2
import time
+from six.moves import queue
+
from ..common import KafkaError
from .base import (
Consumer,
diff --git a/kafka/consumer/simple.py b/kafka/consumer/simple.py
index 946e9c7..abeac7b 100644
--- a/kafka/consumer/simple.py
+++ b/kafka/consumer/simple.py
@@ -5,14 +5,11 @@ try:
except ImportError:
from itertools import izip_longest as izip_longest, repeat # pylint: disable=E0611
import logging
-try:
- import queue # python 3
-except ImportError:
- import Queue as queue # python 2
import sys
import time
import six
+from six.moves import queue
from .base import (
Consumer,