Skip to content

Commit

Permalink
Replace future and final clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
ods committed Oct 23, 2023
1 parent 6d70164 commit a2ec341
Show file tree
Hide file tree
Showing 19 changed files with 9 additions and 3,522 deletions.
4 changes: 2 additions & 2 deletions aiokafka/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import threading
import time

from kafka.future import Future
from concurrent.futures import Future

from aiokafka import errors as Errors
from aiokafka.conn import collect_hosts
Expand Down Expand Up @@ -189,7 +189,7 @@ def request_update(self):
change the reported ttl()
Returns:
kafka.future.Future (value will be the cluster object after update)
Future (value will be the cluster object after update)
"""
with self._lock:
self._need_update = True
Expand Down
3 changes: 1 addition & 2 deletions aiokafka/coordinator/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
import threading
import time
import weakref

from kafka.future import Future
from concurrent.futures import Future

Check warning on line 7 in aiokafka/coordinator/base.py

View check run for this annotation

Codecov / codecov/patch

aiokafka/coordinator/base.py#L1-L7

Added lines #L1 - L7 were not covered by tests

from aiokafka import errors as Errors
from aiokafka.metrics import AnonMeasurable
Expand Down
5 changes: 2 additions & 3 deletions aiokafka/coordinator/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import functools
import logging
import time

from kafka.future import Future
from concurrent.futures import Future

Check warning on line 6 in aiokafka/coordinator/consumer.py

View check run for this annotation

Codecov / codecov/patch

aiokafka/coordinator/consumer.py#L1-L6

Added lines #L1 - L6 were not covered by tests

import aiokafka.errors as Errors
from aiokafka.metrics import AnonMeasurable
Expand Down Expand Up @@ -503,7 +502,7 @@ def commit_offsets_async(self, offsets, callback=None):
a commit request completes.
Returns:
kafka.future.Future
Future
"""
self._invoke_completed_offset_commit_callbacks()
if not self.coordinator_unknown():
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/manual_commit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Consumer:
import json
import asyncio
from kafka.common import KafkaError
from aiokafka.errors import KafkaError
from aiokafka import AIOKafkaConsumer
async def consume():
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/serialize_and_compress.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Consumer
import json
import asyncio
from kafka.common import KafkaError
from aiokafka.errors import KafkaError
from aiokafka import AIOKafkaConsumer
def deserializer(serialized):
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ssl_consume_produce.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ information.
import asyncio
from aiokafka import AIOKafkaProducer, AIOKafkaConsumer
from aiokafka.helpers import create_ssl_context
from kafka.common import TopicPartition
from aiokafka.errors import TopicPartition
context = create_ssl_context(
cafile="./ca-cert", # CA used to sign certificate.
Expand Down
17 changes: 0 additions & 17 deletions kafka/__init__.py

This file was deleted.

83 changes: 0 additions & 83 deletions kafka/future.py

This file was deleted.

Empty file removed kafka/vendor/__init__.py
Empty file.
Loading

0 comments on commit a2ec341

Please sign in to comment.