itervalues(d) calls d.itervalues() [PY2] and d.values() [PY3]
but SortedDict only implements d.values()
This commit is contained in:
Krombel 2018-08-29 16:26:21 +02:00
parent 82276a18d1
commit 79a8a347a6
2 changed files with 3 additions and 2 deletions

1
changelog.d/3445.bugfix Normal file
View file

@ -0,0 +1 @@
do not use six.itervalues() on SortedDict()

View file

@ -32,7 +32,7 @@ Events are replicated via a separate events stream.
import logging import logging
from collections import namedtuple from collections import namedtuple
from six import iteritems, itervalues from six import iteritems
from sortedcontainers import SortedDict from sortedcontainers import SortedDict
@ -117,7 +117,7 @@ class FederationRemoteSendQueue(object):
user_ids = set( user_ids = set(
user_id user_id
for uids in itervalues(self.presence_changed) for uids in self.presence_changed.values()
for user_id in uids for user_id in uids
) )