]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Refine IN and scalar subquery coercions
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 1 Jun 2020 23:11:19 +0000 (19:11 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 1 Jun 2020 23:11:19 +0000 (19:11 -0400)
commit3d99ee28ed368c3bdbeaf872ef65b0c9a7c0da33
tree6ab9a88793821d16bd573a516a4fbf55d358a453
parentb05c8a0ef8b6e7bfd169a21e7c1f834fdb00da19
Refine IN and scalar subquery coercions

Ensure IN emits a warning when it coerces a FromClause
into a select(), however that it continues to allow the
scalar_subquery() coercion to be automatic, particularly
since it's not clear that "col IN (select)" is necessarily
"scalar" in the case of tuples.

Convert the "scalar_subquery()" warning emitted in other
cases to be a warning, rather than a deprecation warning.
I can't imagine taking this coercion out as it is intuitive
and is always going to happen; we just would like to note that
an implicit coercion is occurring.

Fixes: #5369
Change-Id: I748f01f40bc85c64e2776f9b88ef35641fa8fb5c
lib/sqlalchemy/sql/coercions.py
test/sql/test_deprecations.py
test/sql/test_operators.py
test/sql/test_roles.py