]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Strong reference parent object in association proxy
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 1 Jun 2018 19:50:25 +0000 (14:50 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 1 Oct 2018 20:54:29 +0000 (16:54 -0400)
commit11947c3f1fce71a8b383eb1fc9af28a0ee0fdb80
treec6cc2119ac5ee9771c1bb1699d47eaf5d7e19c59
parent29d54ab69b689c2bc4b9be8273f4c0a96e37153f
Strong reference parent object in association proxy

Considering the reversal of #597 as well as
84420a1d0fe09d7a45e878e853aa9f5258561f8b as I am unable to reproduce
the original issues from that release.

The long-standing behavior of the association proxy collection maintaining
only a weak reference to the parent object is reverted; the proxy will now
maintain a strong reference to the parent for as long as the proxy
collection itself is also in memory, eliminating the "stale association
proxy" error. This change is being made on an experimental basis to see if
any use cases arise where it causes side effects.

Change-Id: I051334be90a343dd0e8a1f35e072075eb14b14a7
Fixes: #4268
doc/build/changelog/migration_13.rst
doc/build/changelog/unreleased_13/4268.rst [new file with mode: 0644]
lib/sqlalchemy/ext/associationproxy.py
test/ext/test_associationproxy.py