summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2023-07-05 18:45:42 -0500
committerGitHub <noreply@github.com>2023-07-05 18:45:42 -0500
commit561d06b481176f61ed12f5a4723b127ff8624662 (patch)
treedd8698aac20317b551250e90c28dd5dc5c3e8042 /synapse
parentAdd basic read/write lock (#15782) (diff)
downloadsynapse-561d06b481176f61ed12f5a4723b127ff8624662.tar.xz
Remove support for Python 3.7 (#15851)
Fix https://github.com/matrix-org/synapse/issues/15836
Diffstat (limited to 'synapse')
-rw-r--r--synapse/__init__.py4
-rw-r--r--synapse/util/check_dependencies.py5
2 files changed, 3 insertions, 6 deletions
diff --git a/synapse/__init__.py b/synapse/__init__.py
index b97ee59f15..6c1801862b 100644
--- a/synapse/__init__.py
+++ b/synapse/__init__.py
@@ -25,8 +25,8 @@ from synapse.util.rust import check_rust_lib_up_to_date
 from synapse.util.stringutils import strtobool
 
 # Check that we're not running on an unsupported Python version.
-if sys.version_info < (3, 7):
-    print("Synapse requires Python 3.7 or above.")
+if sys.version_info < (3, 8):
+    print("Synapse requires Python 3.8 or above.")
     sys.exit(1)
 
 # Allow using the asyncio reactor via env var.
diff --git a/synapse/util/check_dependencies.py b/synapse/util/check_dependencies.py
index 1c0fde4966..114130a08f 100644
--- a/synapse/util/check_dependencies.py
+++ b/synapse/util/check_dependencies.py
@@ -21,16 +21,13 @@ require. But this is probably just symptomatic of Python's package management.
 """
 
 import logging
+from importlib import metadata
 from typing import Iterable, NamedTuple, Optional
 
 from packaging.requirements import Requirement
 
 DISTRIBUTION_NAME = "matrix-synapse"
 
-try:
-    from importlib import metadata
-except ImportError:
-    import importlib_metadata as metadata  # type: ignore[no-redef]
 
 __all__ = ["check_requirements"]