Skip to content

Commit

Permalink
Untie ConsumerRebalanceListener
Browse files Browse the repository at this point in the history
  • Loading branch information
ods committed Oct 22, 2023
1 parent c2041d9 commit c4b88cf
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 1,473 deletions.
3 changes: 1 addition & 2 deletions aiokafka/abc.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import abc
from kafka import ConsumerRebalanceListener as BaseConsumerRebalanceListener


class ConsumerRebalanceListener(BaseConsumerRebalanceListener):
class ConsumerRebalanceListener(abc.ABC):
"""
A callback interface that the user can implement to trigger custom actions
when the set of partitions assigned to the consumer changes.
Expand Down
2 changes: 1 addition & 1 deletion aiokafka/consumer/subscription_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from asyncio import shield, Event, Future
from enum import Enum

from typing import Dict, FrozenSet, Iterable, List, Pattern, Set
from typing import Dict, Iterable, List, Pattern, Set

from aiokafka.errors import IllegalStateError
from aiokafka.structs import OffsetAndMetadata, TopicPartition
Expand Down
1 change: 0 additions & 1 deletion kafka/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def emit(self, record):

from kafka.admin import KafkaAdminClient
from kafka.client_async import KafkaClient
from kafka.consumer.subscription_state import ConsumerRebalanceListener
from kafka.conn import BrokerConnection
from kafka.serializer import Serializer, Deserializer
from kafka.structs import TopicPartition, OffsetAndMetadata
Expand Down
Empty file removed kafka/consumer/__init__.py
Empty file.
501 changes: 0 additions & 501 deletions kafka/consumer/subscription_state.py

This file was deleted.

8 changes: 0 additions & 8 deletions tests/kafka/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ def factory(**broker_params):
broker.close()


@pytest.fixture
def kafka_client(kafka_broker, request):
"""Return a KafkaClient fixture"""
(client,) = kafka_broker.get_clients(cnt=1, client_id='%s_client' % (request.node.name,))
yield client
client.close()


@pytest.fixture
def kafka_consumer(kafka_consumer_factory):
"""Return a KafkaConsumer fixture"""
Expand Down
297 changes: 0 additions & 297 deletions tests/kafka/test_consumer_integration.py

This file was deleted.

Loading

0 comments on commit c4b88cf

Please sign in to comment.