Skip to content

Commit

Permalink
Remove support for api versions as strings from KafkaAdmin
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jeffwidman committed Nov 18, 2018
1 parent 1d44363 commit d67157c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions kafka/admin/kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,6 @@ def __init__(self, **configs):
self.config = copy.copy(self.DEFAULT_CONFIG)
self.config.update(configs)

# 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'],
Expand Down

0 comments on commit d67157c

Please sign in to comment.