]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Fix coercion issue for tuple bindparams
authormike bayer <mike_mp@zzzcomputing.com>
Wed, 15 Feb 2023 22:20:06 +0000 (23:20 +0100)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 16 Feb 2023 02:47:45 +0000 (21:47 -0500)
commit693f7f7a84ac77eaacc9ff9c8035a249d7f1ce7e
tree7e8b02afb6e4828bb14628d3780e3a354bd5af84
parent8855656626202e541bd2c95bc023e820a022322f
Fix coercion issue for tuple bindparams

Fixed issue where element types of a tuple value would be hardcoded to take
on the types from a compared-to tuple, when the comparison were using the
:meth:`.ColumnOperators.in_` operator. This was inconsistent with the usual
way that types are determined for a binary expression, which is that the
actual element type on the right side is considered first before applying
the left-hand-side type.

Fixes: #9313
Change-Id: Ia8874c09682a6512fcf4084cf14481024959c461
doc/build/changelog/unreleased_20/9313.rst [new file with mode: 0644]
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/sql/type_api.py
test/sql/test_operators.py