]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Don't assume key when matching cloned columns in _make_proxy
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 1 Aug 2019 15:45:34 +0000 (11:45 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 1 Aug 2019 15:57:14 +0000 (11:57 -0400)
commit972026784fcac9d1356dd128f3bf19fbbf4ab422
tree3cd85290aa0ebb580f64f3962e663dbc247cf904
parent5a66f6307514e346430b566c4e82f9a323baa4cf
Don't assume key when matching cloned columns in _make_proxy

Fixed issue where internal cloning of SELECT constructs could lead to a key
error if the copy of the SELECT changed its state such that its list of
columns changed.  This was observed to be occurring in some ORM scenarios
which may be unique to 1.3 and above, so is partially a regression fix.

For 1.4, the _is_clone_of key will be removed entirely as it seems to
have no purpose.  This commit is the initial backport to 1.3 which
includes tests.

Fixes: #4780
Change-Id: I0c64962a2eba3763bea3107fc7c7d7aed8244430
(cherry picked from commit 896d47f318c5c27620fd6da805f98811941b88c5)
doc/build/changelog/unreleased_13/4780.rst [new file with mode: 0644]
lib/sqlalchemy/sql/schema.py
test/sql/test_selectable.py