]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Ensure iterable passed to Select is not a mapped class
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 29 Apr 2021 20:38:03 +0000 (16:38 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 29 Apr 2021 20:41:28 +0000 (16:41 -0400)
commit7002b2b0b109e70b47d4ae4f5f6a4d7df5586f21
tree9652d3ef8e9bd1bae574222915bc20a0c99b6a46
parent75d1a599519fde61c9ea2c9d8c935f1e420b8333
Ensure iterable passed to Select is not a mapped class

Fixed regression caused by :ticket:`5395` where tuning back the check for
sequences in :func:`_sql.select` now caused failures when doing 2.0-style
querying with a mapped class that also happens to have an ``__iter__()``
method. Tuned the check some more to accommodate this as well as some other
interesting ``__iter__()`` scenarios.

Fixes: #6300
Change-Id: Idf1983fd764b91a7d5fa8117aee8a3def3cfe5ff
doc/build/changelog/unreleased_14/6300.rst [new file with mode: 0644]
lib/sqlalchemy/sql/selectable.py
test/sql/test_select.py