]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Gracefully degrade unsupported types with asyncpg
authorGord Thompson <gord@gordthompson.com>
Tue, 2 Nov 2021 22:16:50 +0000 (16:16 -0600)
committerGord Thompson <gord@gordthompson.com>
Wed, 3 Nov 2021 12:40:38 +0000 (06:40 -0600)
commite7d2e6754ba3fd677b5c61cd540da91884d90a8b
treeb3e0c4a9417ca101aa7643d9b391008d947bfb25
parente35b3f499d48ea2963d266bbf689c508cef60d8b
Gracefully degrade unsupported types with asyncpg

Fixes: #7284
Modify the on_connect() method of PGDialect_asyncpg to
gracefully degrade unsupported types instead of throwing a
ValueError. Useful for third-party dialects that derive
from PGDialect_asyncpg but whose databases do not support
all types (e.g., CockroachDB supports JSONB but not JSON).

Change-Id: Ibb7cc8c3de632d27b9716a93d83956a590b2a2b0
(cherry picked from commit 96c294da8a50d692b3f0b8e508dbbca5d9c22f1b)
doc/build/changelog/unreleased_14/7284.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/asyncpg.py