From c6d86b25be338b78c79ec9a0f20a365e67e36537 Mon Sep 17 00:00:00 2001 From: Jeff Widman Date: Mon, 22 Oct 2018 01:24:50 -0700 Subject: Vendor `six` consistently Use vendored `six`, and also `six.moves.range` rather than `xrange` --- benchmarks/consumer_performance.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'benchmarks/consumer_performance.py') diff --git a/benchmarks/consumer_performance.py b/benchmarks/consumer_performance.py index 3e879ae..5ffd3f5 100755 --- a/benchmarks/consumer_performance.py +++ b/benchmarks/consumer_performance.py @@ -10,6 +10,8 @@ import sys import threading import traceback +from kafka.vendor.six.moves import range + from kafka import KafkaConsumer, KafkaProducer from test.fixtures import KafkaFixture, ZookeeperFixture @@ -64,7 +66,7 @@ class ConsumerPerformance(object): record = bytes(bytearray(args.record_size)) producer = KafkaProducer(compression_type=args.fixture_compression, **props) - for i in xrange(args.num_records): + for i in range(args.num_records): producer.send(topic=args.topic, value=record) producer.flush() producer.close() -- cgit v1.2.1