]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
run update_subclass anytime we add new clslevel dispatch
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 31 Aug 2022 15:07:23 +0000 (11:07 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 31 Aug 2022 20:54:33 +0000 (16:54 -0400)
commit3c68c7c0341ac41b11185491cf2165336dfed1de
treeac13976d929b9c101bbf36595c78d33cb59c5cf7
parentba2392409c8024367da71f819417f5f6c3a2a2e4
run update_subclass anytime we add new clslevel dispatch

Fixed event listening issue where event listeners added to a superclass
would be lost if a subclass were created which then had its own listeners
associated. The practical example is that of the :class:`.sessionmaker`
class created after events have been associated with the
:class:`_orm.Session` class.

Fixes: #8467
Change-Id: I9bdba8769147e30110a09900d4a577e833ac3af9
(cherry picked from commit d3e0b8e750d864766148cdf1a658a601079eed46)
doc/build/changelog/unreleased_14/8467.rst [new file with mode: 0644]
lib/sqlalchemy/event/attr.py
test/base/test_events.py
test/orm/test_events.py