From b09e9198bc8722a59ad37958ee5944085fe2dee5 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 9 Mar 2023 12:41:03 -0500 Subject: implement active_history for composites Fixed bug where the "active history" feature was not fully implemented for composite attributes, making it impossible to receive events that included the "old" value. This seems to have been the case with older SQLAlchemy versions as well, where "active_history" would be propagated to the underlying column-based attributes, but an event handler listening to the composite attribute itself would not be given the "old" value being replaced, even if the composite() were set up with active_history=True. Additionally, fixed a regression that's local to 2.0 which disallowed active_history on composite from being assigned to the impl with ``attr.impl.active_history=True``. Fixes: #9460 Change-Id: I6d7752a01c8d3fd78de7a90de10e8c52f9b3cd4e --- doc/build/changelog/unreleased_20/9460.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 doc/build/changelog/unreleased_20/9460.rst (limited to 'doc') diff --git a/doc/build/changelog/unreleased_20/9460.rst b/doc/build/changelog/unreleased_20/9460.rst new file mode 100644 index 000000000..a2a7d9c6d --- /dev/null +++ b/doc/build/changelog/unreleased_20/9460.rst @@ -0,0 +1,17 @@ +.. change:: + :tags: bug, orm + :tickets: 9460 + + Fixed bug where the "active history" feature was not fully + implemented for composite attributes, making it impossible to receive + events that included the "old" value. This seems to have been the case + with older SQLAlchemy versions as well, where "active_history" would + be propagated to the underlying column-based attributes, but an event + handler listening to the composite attribute itself would not be given + the "old" value being replaced, even if the composite() were set up + with active_history=True. + + Additionally, fixed a regression that's local to 2.0 which disallowed + active_history on composite from being assigned to the impl with + ``attr.impl.active_history=True``. + -- cgit v1.2.1