Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 4d8b840

Browse files
author
David Robertson
committed
Revert "Don't propgate DB config upwards"
This reverts commit c8f1458.
1 parent 44af3e4 commit 4d8b840

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

synapse/storage/engines/_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
import abc
1515
from enum import IntEnum
16-
from typing import TYPE_CHECKING, Generic, Optional, TypeVar
16+
from typing import TYPE_CHECKING, Any, Generic, Mapping, Optional, TypeVar
1717

1818
from synapse.storage.types import Connection, Cursor, DBAPI2Module
1919

@@ -35,7 +35,7 @@ class IncorrectDatabaseSetup(RuntimeError):
3535

3636

3737
class BaseDatabaseEngine(Generic[ConnectionType], metaclass=abc.ABCMeta):
38-
def __init__(self, module: DBAPI2Module):
38+
def __init__(self, module: DBAPI2Module, config: Mapping[str, Any]):
3939
self.module = module
4040

4141
@property

synapse/storage/engines/postgres.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class PostgresEngine(BaseDatabaseEngine["psycopg2.connection"]):
3535
def __init__(self, database_config: Mapping[str, Any]):
3636
import psycopg2.extensions
3737

38-
super().__init__(psycopg2)
38+
super().__init__(psycopg2, database_config)
3939
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
4040

4141
# Disables passing `bytes` to txn.execute, c.f. #6186. If you do

synapse/storage/engines/sqlite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
class Sqlite3Engine(BaseDatabaseEngine[sqlite3.Connection]):
2828
def __init__(self, database_config: Mapping[str, Any]):
29-
super().__init__(sqlite3)
29+
super().__init__(sqlite3, database_config)
3030

3131
database = database_config.get("args", {}).get("database")
3232
self._is_in_memory = database in (

0 commit comments

Comments
 (0)