]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- Fixed issue where inadvertent use of the Python ``__contains__``
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 2 Feb 2016 15:15:40 +0000 (10:15 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 2 Feb 2016 15:41:01 +0000 (10:41 -0500)
commit69f6a8d714c0b1852229bdac05186f2590c5181c
treee1d6d03d2ff31d48cdc1e048b1046fe4e097d1af
parent786c21b9a41c3fc74936b0ee75835db1f14b8faa
- Fixed issue where inadvertent use of the Python ``__contains__``
override with a column expression (e.g. by using ``'x' in col``)
would cause an endless loop in the case of an ARRAY type, as Python
defers this to ``__getitem__`` access which never raises for this
type.  Overall, all use of ``__contains__`` now raises
NotImplementedError.
fixes #3642

(cherry picked from commit e0a580b3d055a600afae61840058a5a30ef5fe74)
doc/build/changelog/changelog_10.rst
lib/sqlalchemy/sql/default_comparator.py
lib/sqlalchemy/sql/operators.py
test/dialect/postgresql/test_types.py
test/sql/test_operators.py