summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/15604.misc1
-rw-r--r--synapse/storage/controllers/stats.py3
-rw-r--r--tests/test_state.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/changelog.d/15604.misc b/changelog.d/15604.misc
new file mode 100644
index 0000000000..92d1d600bc
--- /dev/null
+++ b/changelog.d/15604.misc
@@ -0,0 +1 @@
+Fix subscriptable type usage in Python <3.9.
diff --git a/synapse/storage/controllers/stats.py b/synapse/storage/controllers/stats.py
index 988e44c6af..2a03528fee 100644
--- a/synapse/storage/controllers/stats.py
+++ b/synapse/storage/controllers/stats.py
@@ -13,8 +13,7 @@
 # limitations under the License.
 
 import logging
-from collections import Counter
-from typing import TYPE_CHECKING, Collection, List, Tuple
+from typing import TYPE_CHECKING, Collection, Counter, List, Tuple
 
 from synapse.api.errors import SynapseError
 from synapse.storage.database import LoggingTransaction
diff --git a/tests/test_state.py b/tests/test_state.py
index 2029d3d60a..ddf59916b1 100644
--- a/tests/test_state.py
+++ b/tests/test_state.py
@@ -264,7 +264,7 @@ class StateTestCase(unittest.TestCase):
 
         self.dummy_store.register_events(graph.walk())
 
-        context_store: dict[str, EventContext] = {}
+        context_store: Dict[str, EventContext] = {}
 
         for event in graph.walk():
             context = yield defer.ensureDeferred(