From: Arie Bovenberg Date: Mon, 31 Jan 2022 20:34:10 +0000 (+0100) Subject: allow weakref to TransactionContext classes X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d69a6932a9de60270c458f9f6526754315547b5;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git allow weakref to TransactionContext classes --- diff --git a/lib/sqlalchemy/engine/util.py b/lib/sqlalchemy/engine/util.py index 6aadd5c5fe..32b59e8e60 100644 --- a/lib/sqlalchemy/engine/util.py +++ b/lib/sqlalchemy/engine/util.py @@ -43,7 +43,7 @@ class TransactionalContext: """ - __slots__ = ("_outer_trans_ctx", "_trans_subject") + __slots__ = ("_outer_trans_ctx", "_trans_subject", "__weakref__") def _transaction_is_active(self): raise NotImplementedError()