]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
guard against unexpected weakref cleanups
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 16 Jul 2021 15:34:13 +0000 (11:34 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 16 Jul 2021 15:34:13 +0000 (11:34 -0400)
commita25d6ead9cf6d2d51ae67e53eac50f642a0bb432
treea6fbc2a44f2c768773ec8da961afc89725bdf7b3
parent42d747f72efd776a575ea776ebb5c768282f44eb
guard against unexpected weakref cleanups

Added some guards against ``KeyError`` in the event system to accommodate
the case that the interpreter is shutting down at the same time
:meth:`_engine.Engine.dispose` is being called, which would cause stack
trace warnings.

Fixes: #6740
Change-Id: I2c42e9edac2371e68b39d8360494c5fddfd6cd8c
doc/build/changelog/unreleased_14/6740.rst [new file with mode: 0644]
lib/sqlalchemy/event/registry.py