summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-06-15 07:03:36 -0400
committerGitHub <noreply@github.com>2020-06-15 07:03:36 -0400
commitbd6dc17221741d4ceae05ae769a70696ae939336 (patch)
treea1313d5dbdc0785aba2066e859b58ad90edf10fa /synapse/api
parentFix warnings about losing log context during UI auth. (#7688) (diff)
downloadsynapse-bd6dc17221741d4ceae05ae769a70696ae939336.tar.xz
Replace iteritems/itervalues/iterkeys with native versions. (#7692)
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/auth.py4
-rw-r--r--synapse/api/errors.py3
2 files changed, 2 insertions, 5 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 06ade25674..06ba6604f3 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -16,8 +16,6 @@
 import logging
 from typing import Optional
 
-from six import itervalues
-
 import pymacaroons
 from netaddr import IPAddress
 
@@ -90,7 +88,7 @@ class Auth(object):
             event, prev_state_ids, for_verification=True
         )
         auth_events = yield self.store.get_events(auth_events_ids)
-        auth_events = {(e.type, e.state_key): e for e in itervalues(auth_events)}
+        auth_events = {(e.type, e.state_key): e for e in auth_events.values()}
 
         room_version_obj = KNOWN_ROOM_VERSIONS[room_version]
         event_auth.check(
diff --git a/synapse/api/errors.py b/synapse/api/errors.py
index d54dfb385d..a07a54580d 100644
--- a/synapse/api/errors.py
+++ b/synapse/api/errors.py
@@ -19,7 +19,6 @@
 import logging
 from typing import Dict, List
 
-from six import iteritems
 from six.moves import http_client
 
 from canonicaljson import json
@@ -497,7 +496,7 @@ def cs_error(msg, code=Codes.UNKNOWN, **kwargs):
         A dict representing the error response JSON.
     """
     err = {"error": msg, "errcode": code}
-    for key, value in iteritems(kwargs):
+    for key, value in kwargs.items():
         err[key] = value
     return err