Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions kafka/consumer/fetcher.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import collections
import copy
import itertools
import logging
import sys
Expand Down Expand Up @@ -611,8 +610,7 @@ def _fetchable_partitions(self):
fetchable = self._subscriptions.fetchable_partitions()
# do not fetch a partition if we have a pending fetch response to process
# use copy.copy to avoid runtimeerror on mutation from different thread
# TODO: switch to deque.copy() with py3
discard = {fetch.topic_partition for fetch in copy.copy(self._completed_fetches)}
discard = {fetch.topic_partition for fetch in self._completed_fetches.copy()}
current = self._next_partition_records
if current:
discard.add(current.topic_partition)
Expand Down