kafka-python 2.1.0__tar.gz → 2.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kafka_python-2.1.0 → kafka_python-2.1.1}/CHANGES.md +9 -1
- {kafka_python-2.1.0 → kafka_python-2.1.1}/PKG-INFO +2 -1
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/conn.py +5 -1
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/assignors/sticky/sticky_assignor.py +1 -1
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/future.py +24 -13
- kafka_python-2.1.1/kafka/version.py +1 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka_python.egg-info/PKG-INFO +2 -1
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka_python.egg-info/requires.txt +1 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/pyproject.toml +1 -1
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_conn.py +30 -0
- kafka_python-2.1.0/kafka/version.py +0 -1
- {kafka_python-2.1.0 → kafka_python-2.1.1}/AUTHORS.md +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/LICENSE +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/MANIFEST.in +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/README.rst +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/admin/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/admin/acl_resource.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/admin/client.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/admin/config_resource.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/admin/new_partitions.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/admin/new_topic.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/client_async.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/cluster.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/codec.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/consumer/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/consumer/fetcher.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/consumer/group.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/consumer/subscription_state.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/assignors/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/assignors/abstract.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/assignors/range.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/assignors/roundrobin.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/assignors/sticky/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/assignors/sticky/partition_movements.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/assignors/sticky/sorted_set.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/base.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/consumer.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/heartbeat.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/protocol.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/errors.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/compound_stat.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/dict_reporter.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/kafka_metric.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/measurable.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/measurable_stat.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/metric_config.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/metric_name.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/metrics.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/metrics_reporter.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/quota.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/stat.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/stats/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/stats/avg.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/stats/count.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/stats/histogram.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/stats/max_stat.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/stats/min_stat.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/stats/percentile.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/stats/percentiles.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/stats/rate.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/stats/sampled_stat.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/stats/sensor.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/metrics/stats/total.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/partitioner/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/partitioner/default.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/producer/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/producer/buffer.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/producer/future.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/producer/kafka.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/producer/record_accumulator.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/producer/sender.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/abstract.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/admin.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/api.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/api_versions.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/broker_api_versions.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/commit.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/fetch.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/find_coordinator.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/frame.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/group.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/list_offsets.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/message.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/metadata.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/offset_for_leader_epoch.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/parser.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/pickle.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/produce.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/sasl_authenticate.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/sasl_handshake.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/struct.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/protocol/types.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/record/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/record/_crc32c.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/record/abc.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/record/default_records.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/record/legacy_records.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/record/memory_records.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/record/util.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/sasl/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/sasl/abc.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/sasl/gssapi.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/sasl/msk.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/sasl/oauth.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/sasl/plain.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/sasl/scram.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/sasl/sspi.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/serializer/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/serializer/abstract.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/socks5_wrapper.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/structs.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/util.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/vendor/__init__.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/vendor/enum34.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/vendor/selectors34.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/vendor/six.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/vendor/socketpair.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka_python.egg-info/SOURCES.txt +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka_python.egg-info/dependency_links.txt +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/kafka_python.egg-info/top_level.txt +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/setup.cfg +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/setup.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_acl_comparisons.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_admin.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_admin_integration.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_api_object_implementation.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_assignors.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_client_async.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_cluster.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_codec.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_consumer.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_consumer_group.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_consumer_integration.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_coordinator.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_fetcher.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_metrics.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_object_conversion.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_package.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_partition_movements.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_partitioner.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_producer.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_protocol.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_sasl_integration.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_sender.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/test_subscription_state.py +0 -0
- {kafka_python-2.1.0 → kafka_python-2.1.1}/test/testutil.py +0 -0
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
# 2.1.
|
|
1
|
+
# 2.1.1 (Mar 16, 2025)
|
|
2
|
+
|
|
3
|
+
Fixes
|
|
4
|
+
* Fix packaging of 2.1.0 in Fedora: testing requires "pytest-timeout". (#2550)
|
|
5
|
+
* Improve connection error handling when try_api_versions_check fails all attempts (#2548)
|
|
6
|
+
* Add lock synchronization to Future success/failure (#2549)
|
|
7
|
+
* Fix StickyPartitionAssignor encode
|
|
8
|
+
|
|
9
|
+
# 2.1.0 (Mar 15, 2025)
|
|
2
10
|
|
|
3
11
|
Support Kafka Broker 2.1 API Baseline
|
|
4
12
|
* Add baseline leader_epoch support for ListOffsets v4 / FetchRequest v10 (#2511)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: kafka-python
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Pure Python client for Apache Kafka
|
|
5
5
|
Author-email: Dana Powers <dana.powers@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/dpkp/kafka-python
|
|
@@ -37,6 +37,7 @@ Provides-Extra: testing
|
|
|
37
37
|
Requires-Dist: pytest; extra == "testing"
|
|
38
38
|
Requires-Dist: mock; python_version < "3.3" and extra == "testing"
|
|
39
39
|
Requires-Dist: pytest-mock; extra == "testing"
|
|
40
|
+
Requires-Dist: pytest-timeout; extra == "testing"
|
|
40
41
|
|
|
41
42
|
Kafka Python client
|
|
42
43
|
------------------------
|
|
@@ -531,6 +531,9 @@ class BrokerConnection(object):
|
|
|
531
531
|
if self._api_versions_future is None:
|
|
532
532
|
if self.config['api_version'] is not None:
|
|
533
533
|
self._api_version = self.config['api_version']
|
|
534
|
+
# api_version will be normalized by KafkaClient, so this should not happen
|
|
535
|
+
if self._api_version not in BROKER_API_VERSIONS:
|
|
536
|
+
raise Errors.UnrecognizedBrokerVersion('api_version %s not found in kafka.protocol.broker_api_versions' % (self._api_version,))
|
|
534
537
|
self._api_versions = BROKER_API_VERSIONS[self._api_version]
|
|
535
538
|
log.debug('%s: Using pre-configured api_version %s for ApiVersions', self, self._api_version)
|
|
536
539
|
return True
|
|
@@ -553,7 +556,8 @@ class BrokerConnection(object):
|
|
|
553
556
|
self.state = ConnectionStates.API_VERSIONS_RECV
|
|
554
557
|
self.config['state_change_callback'](self.node_id, self._sock, self)
|
|
555
558
|
else:
|
|
556
|
-
|
|
559
|
+
self.close(Errors.KafkaConnectionError('Unable to determine broker version.'))
|
|
560
|
+
return False
|
|
557
561
|
|
|
558
562
|
for r, f in self.recv():
|
|
559
563
|
f.success(r)
|
{kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/assignors/sticky/sticky_assignor.py
RENAMED
|
@@ -659,7 +659,7 @@ class StickyPartitionAssignor(AbstractPartitionAssignor):
|
|
|
659
659
|
partitions_by_topic = defaultdict(list)
|
|
660
660
|
for topic_partition in member_assignment_partitions:
|
|
661
661
|
partitions_by_topic[topic_partition.topic].append(topic_partition.partition)
|
|
662
|
-
data = StickyAssignorUserDataV1(
|
|
662
|
+
data = StickyAssignorUserDataV1(list(partitions_by_topic.items()), generation)
|
|
663
663
|
user_data = data.encode()
|
|
664
664
|
return ConsumerProtocolMemberMetadata(cls.version, list(topics), user_data)
|
|
665
665
|
|
|
@@ -2,6 +2,7 @@ from __future__ import absolute_import
|
|
|
2
2
|
|
|
3
3
|
import functools
|
|
4
4
|
import logging
|
|
5
|
+
import threading
|
|
5
6
|
|
|
6
7
|
log = logging.getLogger(__name__)
|
|
7
8
|
|
|
@@ -15,6 +16,7 @@ class Future(object):
|
|
|
15
16
|
self.exception = None
|
|
16
17
|
self._callbacks = []
|
|
17
18
|
self._errbacks = []
|
|
19
|
+
self._lock = threading.Lock()
|
|
18
20
|
|
|
19
21
|
def succeeded(self):
|
|
20
22
|
return self.is_done and not bool(self.exception)
|
|
@@ -30,37 +32,46 @@ class Future(object):
|
|
|
30
32
|
|
|
31
33
|
def success(self, value):
|
|
32
34
|
assert not self.is_done, 'Future is already complete'
|
|
33
|
-
self.
|
|
34
|
-
|
|
35
|
+
with self._lock:
|
|
36
|
+
self.value = value
|
|
37
|
+
self.is_done = True
|
|
35
38
|
if self._callbacks:
|
|
36
39
|
self._call_backs('callback', self._callbacks, self.value)
|
|
37
40
|
return self
|
|
38
41
|
|
|
39
42
|
def failure(self, e):
|
|
40
43
|
assert not self.is_done, 'Future is already complete'
|
|
41
|
-
|
|
42
|
-
assert isinstance(
|
|
44
|
+
exception = e if type(e) is not type else e()
|
|
45
|
+
assert isinstance(exception, BaseException), (
|
|
43
46
|
'future failed without an exception')
|
|
44
|
-
self.
|
|
47
|
+
with self._lock:
|
|
48
|
+
self.exception = exception
|
|
49
|
+
self.is_done = True
|
|
45
50
|
self._call_backs('errback', self._errbacks, self.exception)
|
|
46
51
|
return self
|
|
47
52
|
|
|
48
53
|
def add_callback(self, f, *args, **kwargs):
|
|
49
54
|
if args or kwargs:
|
|
50
55
|
f = functools.partial(f, *args, **kwargs)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
self.
|
|
56
|
+
with self._lock:
|
|
57
|
+
if not self.is_done:
|
|
58
|
+
self._callbacks.append(f)
|
|
59
|
+
elif self.succeeded():
|
|
60
|
+
self._lock.release()
|
|
61
|
+
self._call_backs('callback', [f], self.value)
|
|
62
|
+
self._lock.acquire()
|
|
55
63
|
return self
|
|
56
64
|
|
|
57
65
|
def add_errback(self, f, *args, **kwargs):
|
|
58
66
|
if args or kwargs:
|
|
59
67
|
f = functools.partial(f, *args, **kwargs)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
self.
|
|
68
|
+
with self._lock:
|
|
69
|
+
if not self.is_done:
|
|
70
|
+
self._errbacks.append(f)
|
|
71
|
+
elif self.failed():
|
|
72
|
+
self._lock.release()
|
|
73
|
+
self._call_backs('errback', [f], self.exception)
|
|
74
|
+
self._lock.acquire()
|
|
64
75
|
return self
|
|
65
76
|
|
|
66
77
|
def add_both(self, f, *args, **kwargs):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '2.1.1'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: kafka-python
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Pure Python client for Apache Kafka
|
|
5
5
|
Author-email: Dana Powers <dana.powers@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/dpkp/kafka-python
|
|
@@ -37,6 +37,7 @@ Provides-Extra: testing
|
|
|
37
37
|
Requires-Dist: pytest; extra == "testing"
|
|
38
38
|
Requires-Dist: mock; python_version < "3.3" and extra == "testing"
|
|
39
39
|
Requires-Dist: pytest-mock; extra == "testing"
|
|
40
|
+
Requires-Dist: pytest-timeout; extra == "testing"
|
|
40
41
|
|
|
41
42
|
Kafka Python client
|
|
42
43
|
------------------------
|
|
@@ -37,7 +37,7 @@ crc32c = ["crc32c"]
|
|
|
37
37
|
lz4 = ["lz4"]
|
|
38
38
|
snappy = ["python-snappy"]
|
|
39
39
|
zstd = ["zstandard"]
|
|
40
|
-
testing = ["pytest", "mock; python_version < '3.3'", "pytest-mock"]
|
|
40
|
+
testing = ["pytest", "mock; python_version < '3.3'", "pytest-mock", "pytest-timeout"]
|
|
41
41
|
|
|
42
42
|
[tool.setuptools]
|
|
43
43
|
include-package-data = false
|
|
@@ -69,6 +69,36 @@ def test_connect(_socket, conn, states):
|
|
|
69
69
|
assert conn.state is state
|
|
70
70
|
|
|
71
71
|
|
|
72
|
+
def test_api_versions_check(_socket):
|
|
73
|
+
conn = BrokerConnection('localhost', 9092, socket.AF_INET)
|
|
74
|
+
assert conn._api_versions_future is None
|
|
75
|
+
conn.connect()
|
|
76
|
+
assert conn._api_versions_future is not None
|
|
77
|
+
assert conn.connecting() is True
|
|
78
|
+
assert conn.state is ConnectionStates.API_VERSIONS_RECV
|
|
79
|
+
|
|
80
|
+
assert conn._try_api_versions_check() is False
|
|
81
|
+
assert conn.connecting() is True
|
|
82
|
+
assert conn.state is ConnectionStates.API_VERSIONS_RECV
|
|
83
|
+
|
|
84
|
+
conn._api_versions_future = None
|
|
85
|
+
conn._check_version_idx = 0
|
|
86
|
+
assert conn._try_api_versions_check() is False
|
|
87
|
+
assert conn.connecting() is True
|
|
88
|
+
|
|
89
|
+
conn._check_version_idx = len(conn.VERSION_CHECKS)
|
|
90
|
+
conn._api_versions_future = None
|
|
91
|
+
assert conn._try_api_versions_check() is False
|
|
92
|
+
assert conn.connecting() is False
|
|
93
|
+
assert conn.disconnected() is True
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def test_api_versions_check_unrecognized(_socket):
|
|
97
|
+
conn = BrokerConnection('localhost', 9092, socket.AF_INET, api_version=(0, 0))
|
|
98
|
+
with pytest.raises(Errors.UnrecognizedBrokerVersion):
|
|
99
|
+
conn.connect()
|
|
100
|
+
|
|
101
|
+
|
|
72
102
|
def test_connect_timeout(_socket, conn):
|
|
73
103
|
assert conn.state is ConnectionStates.DISCONNECTED
|
|
74
104
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '2.1.0'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{kafka_python-2.1.0 → kafka_python-2.1.1}/kafka/coordinator/assignors/sticky/partition_movements.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|