diff --git a/changelog.d/12974.bugfix b/changelog.d/12974.bugfix new file mode 100644 index 000000000000..9be2cb1b3cb4 --- /dev/null +++ b/changelog.d/12974.bugfix @@ -0,0 +1 @@ +Fix a bug introduced in v1.60.0 that causes synapse to fail to start when python module sqlite3 is not installed. diff --git a/synapse/replication/slave/storage/_base.py b/synapse/replication/slave/storage/_base.py index 7644146dbadb..187952ced254 100644 --- a/synapse/replication/slave/storage/_base.py +++ b/synapse/replication/slave/storage/_base.py @@ -17,7 +17,7 @@ from synapse.storage.database import DatabasePool, LoggingDatabaseConnection from synapse.storage.databases.main.cache import CacheInvalidationWorkerStore -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.util.id_generators import MultiWriterIdGenerator if TYPE_CHECKING: diff --git a/synapse/storage/background_updates.py b/synapse/storage/background_updates.py index b1e5208c7603..09d8d06855e2 100644 --- a/synapse/storage/background_updates.py +++ b/synapse/storage/background_updates.py @@ -628,7 +628,7 @@ def create_index_sqlite(conn: Connection) -> None: logger.debug("[SQL] %s", sql) c.execute(sql) - if isinstance(self.db_pool.engine, engines.PostgresEngine): + if isinstance(self.db_pool.engine, engines.postgres.PostgresEngine): runner: Optional[Callable[[Connection], None]] = create_index_psql elif psql_only: runner = None diff --git a/synapse/storage/database.py b/synapse/storage/database.py index a78d68a9d7fe..1011e4229554 100644 --- a/synapse/storage/database.py +++ b/synapse/storage/database.py @@ -55,7 +55,9 @@ from synapse.metrics import register_threadpool from synapse.metrics.background_process_metrics import run_as_background_process from synapse.storage.background_updates import BackgroundUpdater -from synapse.storage.engines import BaseDatabaseEngine, PostgresEngine, Sqlite3Engine +from synapse.storage.engines import BaseDatabaseEngine +from synapse.storage.engines.postgres import PostgresEngine +from synapse.storage.engines.sqlite import Sqlite3Engine from synapse.storage.types import Connection, Cursor from synapse.util.async_helpers import delay_cancellation from synapse.util.iterutils import batch_iter diff --git a/synapse/storage/databases/main/__init__.py b/synapse/storage/databases/main/__init__.py index 11d9d16c1900..630b70736f2f 100644 --- a/synapse/storage/databases/main/__init__.py +++ b/synapse/storage/databases/main/__init__.py @@ -24,7 +24,8 @@ LoggingTransaction, ) from synapse.storage.databases.main.stats import UserSortOrder -from synapse.storage.engines import BaseDatabaseEngine, PostgresEngine +from synapse.storage.engines import BaseDatabaseEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.types import Cursor from synapse.storage.util.id_generators import MultiWriterIdGenerator, StreamIdGenerator from synapse.types import JsonDict, get_domain_from_id diff --git a/synapse/storage/databases/main/account_data.py b/synapse/storage/databases/main/account_data.py index 9af9f4f18e19..35fe7f7f4c78 100644 --- a/synapse/storage/databases/main/account_data.py +++ b/synapse/storage/databases/main/account_data.py @@ -37,7 +37,7 @@ ) from synapse.storage.databases.main.cache import CacheInvalidationWorkerStore from synapse.storage.databases.main.push_rule import PushRulesWorkerStore -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.util.id_generators import ( AbstractStreamIdGenerator, AbstractStreamIdTracker, diff --git a/synapse/storage/databases/main/cache.py b/synapse/storage/databases/main/cache.py index 1653a6a9b694..db90c66a7d9e 100644 --- a/synapse/storage/databases/main/cache.py +++ b/synapse/storage/databases/main/cache.py @@ -31,7 +31,7 @@ LoggingDatabaseConnection, LoggingTransaction, ) -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.util.caches.descriptors import _CachedFunction from synapse.util.iterutils import batch_iter diff --git a/synapse/storage/databases/main/deviceinbox.py b/synapse/storage/databases/main/deviceinbox.py index 599b41838397..d954de168415 100644 --- a/synapse/storage/databases/main/deviceinbox.py +++ b/synapse/storage/databases/main/deviceinbox.py @@ -36,7 +36,7 @@ LoggingTransaction, make_in_list_sql_clause, ) -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.util.id_generators import ( AbstractStreamIdGenerator, MultiWriterIdGenerator, diff --git a/synapse/storage/databases/main/end_to_end_keys.py b/synapse/storage/databases/main/end_to_end_keys.py index 9b293475c871..14a56919c0c0 100644 --- a/synapse/storage/databases/main/end_to_end_keys.py +++ b/synapse/storage/databases/main/end_to_end_keys.py @@ -42,7 +42,7 @@ make_in_list_sql_clause, ) from synapse.storage.databases.main.cache import CacheInvalidationWorkerStore -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.util.id_generators import StreamIdGenerator from synapse.types import JsonDict from synapse.util import json_encoder diff --git a/synapse/storage/databases/main/event_federation.py b/synapse/storage/databases/main/event_federation.py index eec55b647857..1f2a0814f775 100644 --- a/synapse/storage/databases/main/event_federation.py +++ b/synapse/storage/databases/main/event_federation.py @@ -42,7 +42,7 @@ ) from synapse.storage.databases.main.events_worker import EventsWorkerStore from synapse.storage.databases.main.signatures import SignatureWorkerStore -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.types import JsonDict from synapse.util import json_encoder from synapse.util.caches.descriptors import cached diff --git a/synapse/storage/databases/main/events_worker.py b/synapse/storage/databases/main/events_worker.py index b99b10778490..9697f9c5b408 100644 --- a/synapse/storage/databases/main/events_worker.py +++ b/synapse/storage/databases/main/events_worker.py @@ -67,7 +67,7 @@ LoggingDatabaseConnection, LoggingTransaction, ) -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.types import Cursor from synapse.storage.util.id_generators import ( AbstractStreamIdTracker, diff --git a/synapse/storage/databases/main/presence.py b/synapse/storage/databases/main/presence.py index 9769a18a9d0c..c0b9fc3d7054 100644 --- a/synapse/storage/databases/main/presence.py +++ b/synapse/storage/databases/main/presence.py @@ -23,7 +23,7 @@ LoggingTransaction, ) from synapse.storage.databases.main.cache import CacheInvalidationWorkerStore -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.types import Connection from synapse.storage.util.id_generators import ( AbstractStreamIdGenerator, diff --git a/synapse/storage/databases/main/push_rule.py b/synapse/storage/databases/main/push_rule.py index d5aefe02b6dc..a938914ef5b0 100644 --- a/synapse/storage/databases/main/push_rule.py +++ b/synapse/storage/databases/main/push_rule.py @@ -31,7 +31,8 @@ from synapse.storage.databases.main.pusher import PusherWorkerStore from synapse.storage.databases.main.receipts import ReceiptsWorkerStore from synapse.storage.databases.main.roommember import RoomMemberWorkerStore -from synapse.storage.engines import PostgresEngine, Sqlite3Engine +from synapse.storage.engines.postgres import PostgresEngine +from synapse.storage.engines.sqlite import Sqlite3Engine from synapse.storage.push_rule import InconsistentRuleException, RuleNotFoundException from synapse.storage.util.id_generators import ( AbstractStreamIdGenerator, diff --git a/synapse/storage/databases/main/receipts.py b/synapse/storage/databases/main/receipts.py index 21e954ccc188..ff0b4275cbf3 100644 --- a/synapse/storage/databases/main/receipts.py +++ b/synapse/storage/databases/main/receipts.py @@ -35,7 +35,7 @@ LoggingDatabaseConnection, LoggingTransaction, ) -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.util.id_generators import ( AbstractStreamIdTracker, MultiWriterIdGenerator, diff --git a/synapse/storage/databases/main/relations.py b/synapse/storage/databases/main/relations.py index b457bc189eb4..0d741a2cc901 100644 --- a/synapse/storage/databases/main/relations.py +++ b/synapse/storage/databases/main/relations.py @@ -33,7 +33,7 @@ from synapse.storage._base import SQLBaseStore from synapse.storage.database import LoggingTransaction, make_in_list_sql_clause from synapse.storage.databases.main.stream import generate_pagination_where_clause -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.types import JsonDict, RoomStreamToken, StreamKeyType, StreamToken from synapse.util.caches.descriptors import cached, cachedList diff --git a/synapse/storage/databases/main/roommember.py b/synapse/storage/databases/main/roommember.py index 31bc8c56011a..f1b79c4805b9 100644 --- a/synapse/storage/databases/main/roommember.py +++ b/synapse/storage/databases/main/roommember.py @@ -45,7 +45,7 @@ ) from synapse.storage.databases.main.cache import CacheInvalidationWorkerStore from synapse.storage.databases.main.events_worker import EventsWorkerStore -from synapse.storage.engines import Sqlite3Engine +from synapse.storage.engines.sqlite import Sqlite3Engine from synapse.storage.roommember import ( GetRoomsForUserWithStreamOrdering, MemberSummary, diff --git a/synapse/storage/databases/main/search.py b/synapse/storage/databases/main/search.py index 78e0773b2a88..17b0d05d57d1 100644 --- a/synapse/storage/databases/main/search.py +++ b/synapse/storage/databases/main/search.py @@ -27,7 +27,9 @@ LoggingTransaction, ) from synapse.storage.databases.main.events_worker import EventRedactBehaviour -from synapse.storage.engines import BaseDatabaseEngine, PostgresEngine, Sqlite3Engine +from synapse.storage.engines import BaseDatabaseEngine +from synapse.storage.engines.postgres import PostgresEngine +from synapse.storage.engines.sqlite import Sqlite3Engine from synapse.types import JsonDict if TYPE_CHECKING: diff --git a/synapse/storage/databases/main/stream.py b/synapse/storage/databases/main/stream.py index 8e88784d3ce3..8553c0155d49 100644 --- a/synapse/storage/databases/main/stream.py +++ b/synapse/storage/databases/main/stream.py @@ -64,7 +64,8 @@ make_in_list_sql_clause, ) from synapse.storage.databases.main.events_worker import EventsWorkerStore -from synapse.storage.engines import BaseDatabaseEngine, PostgresEngine +from synapse.storage.engines import BaseDatabaseEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.util.id_generators import MultiWriterIdGenerator from synapse.types import PersistedEventPosition, RoomStreamToken from synapse.util.caches.descriptors import cached diff --git a/synapse/storage/databases/main/user_directory.py b/synapse/storage/databases/main/user_directory.py index ddb25b5cea7f..a2ca63b5490e 100644 --- a/synapse/storage/databases/main/user_directory.py +++ b/synapse/storage/databases/main/user_directory.py @@ -42,7 +42,8 @@ ) from synapse.storage.databases.main.state import StateFilter from synapse.storage.databases.main.state_deltas import StateDeltasStore -from synapse.storage.engines import PostgresEngine, Sqlite3Engine +from synapse.storage.engines.postgres import PostgresEngine +from synapse.storage.engines.sqlite import Sqlite3Engine from synapse.types import ( JsonDict, UserProfile, diff --git a/synapse/storage/databases/state/bg_updates.py b/synapse/storage/databases/state/bg_updates.py index fa9eadaca7ea..4cd848c22095 100644 --- a/synapse/storage/databases/state/bg_updates.py +++ b/synapse/storage/databases/state/bg_updates.py @@ -21,7 +21,7 @@ LoggingDatabaseConnection, LoggingTransaction, ) -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.state import StateFilter from synapse.types import MutableStateMap, StateMap diff --git a/synapse/storage/engines/__init__.py b/synapse/storage/engines/__init__.py index f51b3d228ee7..6b0024c611c5 100644 --- a/synapse/storage/engines/__init__.py +++ b/synapse/storage/engines/__init__.py @@ -14,17 +14,19 @@ from typing import Any, Mapping from ._base import BaseDatabaseEngine, IncorrectDatabaseSetup -from .postgres import PostgresEngine -from .sqlite import Sqlite3Engine def create_engine(database_config: Mapping[str, Any]) -> BaseDatabaseEngine: name = database_config["name"] if name == "sqlite3": + from .sqlite import Sqlite3Engine + return Sqlite3Engine(database_config) if name == "psycopg2": + from .postgres import PostgresEngine + return PostgresEngine(database_config) raise RuntimeError("Unsupported database engine '%s'" % (name,)) diff --git a/synapse/storage/engines/postgres.py b/synapse/storage/engines/postgres.py index 391f8ed24a3d..2cd131b784a9 100644 --- a/synapse/storage/engines/postgres.py +++ b/synapse/storage/engines/postgres.py @@ -23,7 +23,7 @@ from synapse.storage.types import Cursor if TYPE_CHECKING: - import psycopg2 # noqa: F401 + import psycopg2 from synapse.storage.database import LoggingDatabaseConnection diff --git a/synapse/storage/schema/main/delta/25/fts.py b/synapse/storage/schema/main/delta/25/fts.py index 21f57825d4ed..4a84715ce1fe 100644 --- a/synapse/storage/schema/main/delta/25/fts.py +++ b/synapse/storage/schema/main/delta/25/fts.py @@ -14,7 +14,8 @@ import json import logging -from synapse.storage.engines import PostgresEngine, Sqlite3Engine +from synapse.storage.engines.postgres import PostgresEngine +from synapse.storage.engines.sqlite import Sqlite3Engine from synapse.storage.prepare_database import get_statements logger = logging.getLogger(__name__) diff --git a/synapse/storage/schema/main/delta/31/search_update.py b/synapse/storage/schema/main/delta/31/search_update.py index b84c844e3af4..a7a3d13ea374 100644 --- a/synapse/storage/schema/main/delta/31/search_update.py +++ b/synapse/storage/schema/main/delta/31/search_update.py @@ -14,7 +14,7 @@ import json import logging -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.prepare_database import get_statements logger = logging.getLogger(__name__) diff --git a/synapse/storage/schema/main/delta/34/cache_stream.py b/synapse/storage/schema/main/delta/34/cache_stream.py index cf09e43e2bf2..3dcc02c32fe9 100644 --- a/synapse/storage/schema/main/delta/34/cache_stream.py +++ b/synapse/storage/schema/main/delta/34/cache_stream.py @@ -14,7 +14,7 @@ import logging -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.prepare_database import get_statements logger = logging.getLogger(__name__) diff --git a/synapse/storage/schema/main/delta/34/received_txn_purge.py b/synapse/storage/schema/main/delta/34/received_txn_purge.py index 67d505e68bf4..a2ca923fd207 100644 --- a/synapse/storage/schema/main/delta/34/received_txn_purge.py +++ b/synapse/storage/schema/main/delta/34/received_txn_purge.py @@ -14,7 +14,7 @@ import logging -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine logger = logging.getLogger(__name__) diff --git a/synapse/storage/schema/main/delta/37/remove_auth_idx.py b/synapse/storage/schema/main/delta/37/remove_auth_idx.py index a3778841699c..e96f7a2403fc 100644 --- a/synapse/storage/schema/main/delta/37/remove_auth_idx.py +++ b/synapse/storage/schema/main/delta/37/remove_auth_idx.py @@ -14,7 +14,7 @@ import logging -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.prepare_database import get_statements logger = logging.getLogger(__name__) diff --git a/synapse/storage/schema/main/delta/42/user_dir.py b/synapse/storage/schema/main/delta/42/user_dir.py index 506f326f4db4..a1579d82e0d0 100644 --- a/synapse/storage/schema/main/delta/42/user_dir.py +++ b/synapse/storage/schema/main/delta/42/user_dir.py @@ -14,7 +14,8 @@ import logging -from synapse.storage.engines import PostgresEngine, Sqlite3Engine +from synapse.storage.engines.postgres import PostgresEngine +from synapse.storage.engines.sqlite import Sqlite3Engine from synapse.storage.prepare_database import get_statements logger = logging.getLogger(__name__) diff --git a/synapse/storage/schema/main/delta/48/group_unique_indexes.py b/synapse/storage/schema/main/delta/48/group_unique_indexes.py index 49f5f2c00324..92741a1b444e 100644 --- a/synapse/storage/schema/main/delta/48/group_unique_indexes.py +++ b/synapse/storage/schema/main/delta/48/group_unique_indexes.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.prepare_database import get_statements FIX_INDEXES = """ diff --git a/synapse/storage/schema/main/delta/50/make_event_content_nullable.py b/synapse/storage/schema/main/delta/50/make_event_content_nullable.py index acd6ad1e1fca..66361c40a28f 100644 --- a/synapse/storage/schema/main/delta/50/make_event_content_nullable.py +++ b/synapse/storage/schema/main/delta/50/make_event_content_nullable.py @@ -53,7 +53,7 @@ import logging -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine logger = logging.getLogger(__name__) diff --git a/synapse/storage/schema/main/delta/56/unique_user_filter_index.py b/synapse/storage/schema/main/delta/56/unique_user_filter_index.py index bb7296852a61..b6cd083053a3 100644 --- a/synapse/storage/schema/main/delta/56/unique_user_filter_index.py +++ b/synapse/storage/schema/main/delta/56/unique_user_filter_index.py @@ -1,7 +1,7 @@ import logging from io import StringIO -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.prepare_database import execute_statements_from_stream logger = logging.getLogger(__name__) diff --git a/synapse/storage/schema/main/delta/58/06dlols_unique_idx.py b/synapse/storage/schema/main/delta/58/06dlols_unique_idx.py index d353f2bcb361..90f34e33e379 100644 --- a/synapse/storage/schema/main/delta/58/06dlols_unique_idx.py +++ b/synapse/storage/schema/main/delta/58/06dlols_unique_idx.py @@ -20,7 +20,8 @@ import logging from io import StringIO -from synapse.storage.engines import BaseDatabaseEngine, PostgresEngine +from synapse.storage.engines import BaseDatabaseEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.prepare_database import execute_statements_from_stream from synapse.storage.types import Cursor diff --git a/synapse/storage/schema/main/delta/58/11user_id_seq.py b/synapse/storage/schema/main/delta/58/11user_id_seq.py index 4310ec12ce1a..9f5f710fb4c6 100644 --- a/synapse/storage/schema/main/delta/58/11user_id_seq.py +++ b/synapse/storage/schema/main/delta/58/11user_id_seq.py @@ -19,7 +19,7 @@ from synapse.storage.databases.main.registration import ( find_max_generated_user_id_localpart, ) -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine def run_create(cur, database_engine, *args, **kwargs): diff --git a/synapse/storage/schema/main/delta/61/03recreate_min_depth.py b/synapse/storage/schema/main/delta/61/03recreate_min_depth.py index f8d7db9f2ef3..265d2c351312 100644 --- a/synapse/storage/schema/main/delta/61/03recreate_min_depth.py +++ b/synapse/storage/schema/main/delta/61/03recreate_min_depth.py @@ -16,7 +16,8 @@ This migration handles the process of changing the type of `room_depth.min_depth` to a BIGINT. """ -from synapse.storage.engines import BaseDatabaseEngine, PostgresEngine +from synapse.storage.engines import BaseDatabaseEngine +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.types import Cursor diff --git a/synapse/storage/schema/main/delta/68/05partial_state_rooms_triggers.py b/synapse/storage/schema/main/delta/68/05partial_state_rooms_triggers.py index a2ec4fc26edb..837d3b6efd2e 100644 --- a/synapse/storage/schema/main/delta/68/05partial_state_rooms_triggers.py +++ b/synapse/storage/schema/main/delta/68/05partial_state_rooms_triggers.py @@ -18,7 +18,9 @@ Triggers cannot be expressed in .sql files, so we have to use a separate file. """ -from synapse.storage.engines import BaseDatabaseEngine, PostgresEngine, Sqlite3Engine +from synapse.storage.engines import BaseDatabaseEngine +from synapse.storage.engines.postgres import PostgresEngine +from synapse.storage.engines.sqlite import Sqlite3Engine from synapse.storage.types import Cursor diff --git a/synapse/storage/schema/main/delta/69/01as_txn_seq.py b/synapse/storage/schema/main/delta/69/01as_txn_seq.py index 24bd4b391eee..16289d229984 100644 --- a/synapse/storage/schema/main/delta/69/01as_txn_seq.py +++ b/synapse/storage/schema/main/delta/69/01as_txn_seq.py @@ -17,7 +17,7 @@ Adds a postgres SEQUENCE for generating application service transaction IDs. """ -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine def run_create(cur, database_engine, *args, **kwargs): diff --git a/synapse/storage/schema/state/delta/47/state_group_seq.py b/synapse/storage/schema/state/delta/47/state_group_seq.py index 9fd1ccf6f792..754c6298cd27 100644 --- a/synapse/storage/schema/state/delta/47/state_group_seq.py +++ b/synapse/storage/schema/state/delta/47/state_group_seq.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine def run_create(cur, database_engine, *args, **kwargs): diff --git a/synapse/storage/util/sequence.py b/synapse/storage/util/sequence.py index 75268cbe1595..48a39420a628 100644 --- a/synapse/storage/util/sequence.py +++ b/synapse/storage/util/sequence.py @@ -16,11 +16,8 @@ import threading from typing import TYPE_CHECKING, Callable, List, Optional -from synapse.storage.engines import ( - BaseDatabaseEngine, - IncorrectDatabaseSetup, - PostgresEngine, -) +from synapse.storage.engines import BaseDatabaseEngine, IncorrectDatabaseSetup +from synapse.storage.engines.postgres import PostgresEngine from synapse.storage.types import Connection, Cursor if TYPE_CHECKING: diff --git a/tests/server.py b/tests/server.py index b9f465971fdd..bb7c4ce56ae2 100644 --- a/tests/server.py +++ b/tests/server.py @@ -67,7 +67,8 @@ from synapse.logging.context import ContextResourceUsage from synapse.server import HomeServer from synapse.storage import DataStore -from synapse.storage.engines import PostgresEngine, create_engine +from synapse.storage.engines import create_engine +from synapse.storage.engines.postgres import PostgresEngine from synapse.types import JsonDict from synapse.util import Clock diff --git a/tests/storage/test_room_search.py b/tests/storage/test_room_search.py index e747c6b50eb9..c34d37923746 100644 --- a/tests/storage/test_room_search.py +++ b/tests/storage/test_room_search.py @@ -16,7 +16,7 @@ from synapse.api.constants import EventTypes from synapse.api.errors import StoreError from synapse.rest.client import login, room -from synapse.storage.engines import PostgresEngine +from synapse.storage.engines.postgres import PostgresEngine from tests.unittest import HomeserverTestCase, skip_unless from tests.utils import USE_POSTGRES_FOR_TESTS