]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
copy list for __iadd__
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 2 Dec 2021 02:39:59 +0000 (21:39 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 2 Dec 2021 19:58:02 +0000 (14:58 -0500)
commit76e978c970dad5d4eda49d279fdf0876e4f307e9
treee04678f0f5ed92349dd967c3afadd4bed97bbcd4
parent3d4e64b8ef666ea4760c8234ba475b12739660ce
copy list for __iadd__

Fixed issue where a list mapped with :func:`_orm.relationship` would go
into an endless loop if in-place added to itself, i.e. the ``+=`` operator
were used, as well as if ``.extend()`` were given the same list.

Fixes: #7389
Change-Id: Idd5118420f8bc684d1ee36b2b6d4c5812f36cc4c
(cherry picked from commit 9fc17513fe69a1fd26fc522f9862af3e0ebfd2c4)
doc/build/changelog/unreleased_14/7389.rst [new file with mode: 0644]
lib/sqlalchemy/orm/collections.py
test/orm/test_collection.py