Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
itervalues(d) calls d.itervalues() [PY2] and d.values() [PY3]
but SortedDict only implements d.values()
  • Loading branch information
krombel committed Aug 29, 2018
1 parent 82276a1 commit 79a8a34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/3445.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
do not use six.itervalues() on SortedDict()
4 changes: 2 additions & 2 deletions synapse/federation/send_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import logging
from collections import namedtuple

from six import iteritems, itervalues
from six import iteritems

from sortedcontainers import SortedDict

Expand Down Expand Up @@ -117,7 +117,7 @@ def _clear_queue_before_pos(self, position_to_delete):

user_ids = set(
user_id
for uids in itervalues(self.presence_changed)
for uids in self.presence_changed.values()
for user_id in uids
)

Expand Down

0 comments on commit 79a8a34

Please sign in to comment.