From 5636093bf6e6e63bba3c9ac70ebe545a5422f390 Mon Sep 17 00:00:00 2001 From: erebus1 Date: Sun, 5 Jun 2016 12:12:02 +0300 Subject: raise error on empty in_ --- lib/sqlalchemy/sql/default_comparator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/sqlalchemy/sql/default_comparator.py b/lib/sqlalchemy/sql/default_comparator.py index d180dbc02..2a23326f4 100644 --- a/lib/sqlalchemy/sql/default_comparator.py +++ b/lib/sqlalchemy/sql/default_comparator.py @@ -146,6 +146,7 @@ def _in_impl(expr, op, seq_or_selectable, negate_op, **kw): # appropriately, i.e. "not (x IN ())" should not return NULL # values for x. + assert False, 'empty in' util.warn('The IN-predicate on "%s" was invoked with an ' 'empty sequence. This results in a ' 'contradiction, which nonetheless can be ' -- cgit v1.2.1