diff options
author | Jeff Widman <jeff@jeffwidman.com> | 2019-05-23 23:14:37 -0700 |
---|---|---|
committer | Jeff Widman <jeff@jeffwidman.com> | 2019-05-24 00:17:39 -0700 |
commit | b6c6a27de83bd720aa866dc2332e21f2816ea972 (patch) | |
tree | 80430f69fbf95ffc15cd23904ea0f1556a4fda39 /kafka/producer | |
parent | cee4d17df7858439e0dbdf3914ca0107e080af7d (diff) | |
download | kafka-python-Remove-support-for-api_version-strings.tar.gz |
Remove string support in `api_version`Remove-support-for-api_version-strings
A long time ago, `api_version` supported strings. That has been
deprecated for years in favor of tuples. Time to remove support for the
strings.
Diffstat (limited to 'kafka/producer')
-rw-r--r-- | kafka/producer/kafka.py | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/kafka/producer/kafka.py b/kafka/producer/kafka.py index f6a0603..8a4a4e3 100644 --- a/kafka/producer/kafka.py +++ b/kafka/producer/kafka.py @@ -358,16 +358,6 @@ class KafkaProducer(object): if self.config['acks'] == 'all': self.config['acks'] = -1 - # api_version was previously a str. accept old format for now - if isinstance(self.config['api_version'], str): - deprecated = self.config['api_version'] - if deprecated == 'auto': - self.config['api_version'] = None - else: - self.config['api_version'] = tuple(map(int, deprecated.split('.'))) - log.warning('use api_version=%s [tuple] -- "%s" as str is deprecated', - str(self.config['api_version']), deprecated) - # Configure metrics metrics_tags = {'client-id': self.config['client_id']} metric_config = MetricConfig(samples=self.config['metrics_num_samples'], |