]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
guard against KeyError on subclass removal
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 3 Jan 2025 17:19:27 +0000 (12:19 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 3 Jan 2025 17:20:06 +0000 (12:20 -0500)
commit3304bc58a6d6d79db7c87fe4fe569a455a35a3b0
tree3049899366e3a00638c3b896d0d8b9f6d688a7ef
parent04c2485e75a1f042d48d9706c63d1d8851d28910
guard against KeyError on subclass removal

Fixed issue in event system which prevented an event listener from being
attached and detached from multiple class-like objects, namely the
:class:`.sessionmaker` or :class:`.scoped_session` targets that assign to
:class:`.Session` subclasses.

Fixes: #12216
Change-Id: I3d8969fe604adbc23add07a13741938c7f4fc8ca
(cherry picked from commit e4f0afe06baa5d9b57d5b8cfe2647b943f2145e6)
doc/build/changelog/unreleased_20/12216.rst [new file with mode: 0644]
lib/sqlalchemy/event/registry.py
test/base/test_events.py