Skip to content

Commit 02b9798

Browse files
committed
Remove support for api versions as strings from KafkaAdmin
This is a new class, so let's not support the old version strings and saddle ourselves with tech debt right from the get-go.
1 parent 7bd6b5d commit 02b9798

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

kafka/admin/kafka.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,6 @@ def __init__(self, **configs):
171171
self.config = copy.copy(self.DEFAULT_CONFIG)
172172
self.config.update(configs)
173173

174-
# api_version was previously a str. accept old format for now
175-
if isinstance(self.config['api_version'], str):
176-
deprecated = self.config['api_version']
177-
if deprecated == 'auto':
178-
self.config['api_version'] = None
179-
else:
180-
self.config['api_version'] = tuple(map(int, deprecated.split('.')))
181-
log.warning('use api_version=%s [tuple] -- "%s" as str is deprecated',
182-
str(self.config['api_version']), deprecated)
183-
184174
# Configure metrics
185175
metrics_tags = {'client-id': self.config['client_id']}
186176
metric_config = MetricConfig(samples=self.config['metrics_num_samples'],

0 commit comments

Comments
 (0)