]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add bind casts for BIT on asyncpg
authorSören Oldag <soeren.oldag@kiwi.ki>
Thu, 26 Oct 2023 13:17:41 +0000 (09:17 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 28 Oct 2023 15:08:16 +0000 (11:08 -0400)
commit43cc0613b25fb906eeecbf21217ec76c7adacb29
tree656c73c6ef48f84c2d963db87c66683672636e85
parent8a48f9237ad8c1128daee07ae199b11f52a9c21a
Add bind casts for BIT on asyncpg

Fixed SQL handling for "insertmanyvalues" when using the
:class:`.postgresql.BIT` datatype with the asyncpg backend.  The
:class:`.postgresql.BIT` on asyncpg apparently requires the use of an
asyncpg-specific `BitString` type which is currently exposed when using
this DBAPI, making it incompatible with other PostgreSQL DBAPIs that all
work with plain bitstrings here.  A future fix in version 2.1 will
normalize this datatype across all PG backends.   Pull request courtesy
Sören Oldag.

Fixes: #10532
Closes: #10533
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10533
Pull-request-sha: 528607d5b5b67c1b9c2edb39176b7e005db371f6

Change-Id: I879f2fc24b5650467b85f170c0def15834f75456
doc/build/changelog/unreleased_20/10532.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/asyncpg.py
test/dialect/postgresql/test_types.py