]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Guard against KeyError in session.merge after check for identity
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 4 Sep 2017 16:11:19 +0000 (12:11 -0400)
committermike bayer <mike_mp@zzzcomputing.com>
Mon, 4 Sep 2017 23:37:34 +0000 (19:37 -0400)
commit1e21f9c4f8984b9d0c228e49cb3fa1b03c667c25
tree4f3cb2811cdb2334061e6ec0d4eaf2537d75be1a
parent65680b2343ef421a62582e23e2b35293732933ad
Guard against KeyError in session.merge after check for identity

Fixed bug in :meth:`.Session.merge` following along similar lines as that
of :ticket:`4030`, where an internal check for a target object in
the identity map could lead to an error if it were to be garbage collected
immediately before the merge routine actually retrieves the object.

Change-Id: Ifecfb8b9d50c52d0ebd5a03e1bd69fe3abf1dc40
Fixes: #4069
doc/build/changelog/unreleased_11/4069.rst [new file with mode: 0644]
lib/sqlalchemy/orm/session.py