summary refs log tree commit diff
path: root/synapse/types.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-04-22 16:43:50 +0100
committerGitHub <noreply@github.com>2021-04-22 16:43:50 +0100
commit294c67503300b6bfa7785a5cfa55e25c1e452574 (patch)
tree51ce6340ba5f84e6cfb3dd53dd3e0c236105ce83 /synapse/types.py
parentMerge branch 'master' into develop (diff)
downloadsynapse-294c67503300b6bfa7785a5cfa55e25c1e452574.tar.xz
Remove `synapse.types.Collection` (#9856)
This is no longer required, since we have dropped support for Python 3.5.
Diffstat (limited to 'synapse/types.py')
-rw-r--r--synapse/types.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/synapse/types.py b/synapse/types.py
index 21654ae686..e19f28d543 100644
--- a/synapse/types.py
+++ b/synapse/types.py
@@ -15,13 +15,11 @@
 import abc
 import re
 import string
-import sys
 from collections import namedtuple
 from typing import (
     TYPE_CHECKING,
     Any,
     Dict,
-    Iterable,
     Mapping,
     MutableMapping,
     Optional,
@@ -50,18 +48,6 @@ if TYPE_CHECKING:
     from synapse.appservice.api import ApplicationService
     from synapse.storage.databases.main import DataStore
 
-# define a version of typing.Collection that works on python 3.5
-if sys.version_info[:3] >= (3, 6, 0):
-    from typing import Collection
-else:
-    from typing import Container, Sized
-
-    T_co = TypeVar("T_co", covariant=True)
-
-    class Collection(Iterable[T_co], Container[T_co], Sized):  # type: ignore
-        __slots__ = ()
-
-
 # Define a state map type from type/state_key to T (usually an event ID or
 # event)
 T = TypeVar("T")