]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
simplify and publicize the asyncpg JSON(B) codec registrsation
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 3 Nov 2021 15:32:51 +0000 (11:32 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 4 Nov 2021 02:10:57 +0000 (22:10 -0400)
commit8bd8f6c5aa1e85907b1517a57a91997532f3ebd7
treef0c017d15b4bd8c7e21f4652ba24661e47b4e4b2
parent2cc49191e28bcf05d97787d6cdc561dd6815e847
simplify and publicize the asyncpg JSON(B) codec registrsation

Added overridable methods ``PGDialect_asyncpg.setup_asyncpg_json_codec``
and ``PGDialect_asyncpg.setup_asyncpg_jsonb_codec`` codec, which handle the
required task of registering JSON/JSONB codecs for these datatypes when
using asyncpg. The change is that methods are broken out as individual,
overridable methods to support third party dialects that need to alter or
disable how these particular codecs are set up.

Fixes: #7284
Change-Id: I3eac258fea61f3975bd03c428747f788813ce45e
doc/build/changelog/unreleased_14/7284.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/asyncpg.py
test/dialect/postgresql/test_async_pg_py3k.py