summary refs log tree commit diff
diff options
context:
space:
mode:
authorH. Shay <hillerys@element.io>2022-06-06 21:30:13 -0700
committerH. Shay <hillerys@element.io>2022-06-06 21:30:13 -0700
commitc92f2f740996e7beb3887476b71476c8674198b6 (patch)
treefda9bda0f8188c026177100eef0c1e5838d432d0
parentuse real newsfragment suffix (diff)
downloadsynapse-github/shay/fix_sqlite.tar.xz
conditionally import psycopg2 github/shay/fix_sqlite shay/fix_sqlite
-rw-r--r--synapse/storage/engines/postgres.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/storage/engines/postgres.py b/synapse/storage/engines/postgres.py
index 7b5dc4413b..2cd131b784 100644
--- a/synapse/storage/engines/postgres.py
+++ b/synapse/storage/engines/postgres.py
@@ -15,8 +15,6 @@
 import logging
 from typing import TYPE_CHECKING, Any, Mapping, NoReturn, Optional, Tuple, cast
 
-import psycopg2
-
 from synapse.storage.engines._base import (
     BaseDatabaseEngine,
     IncorrectDatabaseSetup,
@@ -25,6 +23,7 @@ from synapse.storage.engines._base import (
 from synapse.storage.types import Cursor
 
 if TYPE_CHECKING:
+    import psycopg2
 
     from synapse.storage.database import LoggingDatabaseConnection