Skip to content

Commit 1916742

Browse files
committed
Sigh, asyncpg is the right thing, handled specially by GINO
1 parent 5e8b4c2 commit 1916742

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/gino.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def __init__(self, app=None, *args, **kwargs):
140140
self.config["dsn"] = make_url(kwargs.pop("dsn"))
141141
else:
142142
self.config["dsn"] = URL(
143-
drivername=kwargs.pop("driver", "postgresql+asyncpg"),
143+
drivername=kwargs.pop("driver", "asyncpg"),
144144
host=kwargs.pop("host", "localhost"),
145145
port=kwargs.pop("port", 5432),
146146
username=kwargs.pop("user", "postgres"),

app/settings/globals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def set_database_config(cls, v, values, **kwarg) -> DatabaseURL:
134134
if db_reader_secret:
135135
secret = json.loads(db_reader_secret)
136136
v = DatabaseURL(
137-
drivername="postgresql+asyncpg",
137+
drivername="asyncpg",
138138
username=secret["username"],
139139
password=secret["password"],
140140
host=secret["host"],
@@ -143,7 +143,7 @@ def set_database_config(cls, v, values, **kwarg) -> DatabaseURL:
143143
)
144144
else:
145145
v = DatabaseURL(
146-
drivername="postgresql+asyncpg",
146+
drivername="asyncpg",
147147
username=input.get("reader_username"),
148148
password=input.get("reader_password"),
149149
host=input.get("reader_host"),

0 commit comments

Comments
 (0)