]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
set bindparam.expanding in coercion again
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 11 May 2021 02:52:49 +0000 (22:52 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 11 May 2021 03:42:41 +0000 (23:42 -0400)
commitb146a0c64144639bf02bafda239238e3a8f5c84d
treec9c21a160e14aa177a40f11cf436bc0b2e160659
parent39c2815fb25052c181f98ca52a57fd7449d7090c
set bindparam.expanding in coercion again

Adjusted the logic added as part of :ticket:`6397` in 1.4.12 so that
internal mutation of the :class:`.BindParameter` object occurs within the
clause construction phase as it did before, rather than in the compilation
phase. In the latter case, the mutation still produced side effects against
the incoming construct and additionally could potentially interfere with
other internal mutation routines.

In order to solve the issue of the correct operator being present
on the BindParameter.expand_op, we necessarily have to expand the
BinaryExpression._negate() routine to flip the operator on the
BindParameter also.

Fixes: #6460
Change-Id: I1e53a9aeee4de4fc11af51d7593431532731561b
doc/build/changelog/changelog_14.rst
doc/build/changelog/unreleased_14/6460.rst [new file with mode: 0644]
lib/sqlalchemy/sql/coercions.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/lambdas.py
test/sql/test_external_traversal.py
test/sql/test_lambdas.py
test/sql/test_operators.py