From 1d2e02eb00d7ad1d60886ee5c007f9b4ea591385 Mon Sep 17 00:00:00 2001 From: Diogo Dutra Date: Tue, 27 Oct 2020 11:52:10 -0300 Subject: [PATCH] Fix consumer fetcher for python3.9 (#672) --- CHANGES/python3.9-fix.bugfix | 1 + aiokafka/consumer/fetcher.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 CHANGES/python3.9-fix.bugfix diff --git a/CHANGES/python3.9-fix.bugfix b/CHANGES/python3.9-fix.bugfix new file mode 100644 index 00000000..6ecafb50 --- /dev/null +++ b/CHANGES/python3.9-fix.bugfix @@ -0,0 +1 @@ +Fix consumer fetcher for python3.9 diff --git a/aiokafka/consumer/fetcher.py b/aiokafka/consumer/fetcher.py index 221b27a3..5993e98b 100644 --- a/aiokafka/consumer/fetcher.py +++ b/aiokafka/consumer/fetcher.py @@ -530,7 +530,9 @@ def on_done(fut, self=self): other_futs.append(fut) done_set, _ = await asyncio.wait( - chain(self._pending_tasks, other_futs, resume_futures), + set( + chain(self._pending_tasks, other_futs, resume_futures) + ), timeout=timeout, return_when=asyncio.FIRST_COMPLETED)