From f183d70d1b4299969d5ea8bf33b2943b82378367 Mon Sep 17 00:00:00 2001 From: Sillocan Date: Wed, 2 Jul 2025 14:20:47 -0700 Subject: [PATCH] chore: Fix typo in autoflush warning (#12713) (cherry picked from commit 7376cdf43eef4b038891a5902a7e0692b4bd8185) --- lib/sqlalchemy/orm/session.py | 2 +- test/orm/test_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index ca7b2c2b59..6a589f3a33 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -3045,7 +3045,7 @@ class Session(_SessionClassMethods, EventTarget): "This warning originated from the Session 'autoflush' process, " "which was invoked automatically in response to a user-initiated " "operation. Consider using ``no_autoflush`` context manager if this " - "warning happended while initializing objects.", + "warning happened while initializing objects.", sa_exc.SAWarning, ) def _autoflush(self) -> None: diff --git a/test/orm/test_utils.py b/test/orm/test_utils.py index 35a5060da2..f437a60850 100644 --- a/test/orm/test_utils.py +++ b/test/orm/test_utils.py @@ -141,7 +141,7 @@ class ContextualWarningsTest(fixtures.TestBase): "(This warning originated from the Session 'autoflush' " "process, which was invoked automatically in response to a " "user-initiated operation. Consider using ``no_autoflush`` " - "context manager if this warning happended while " + "context manager if this warning happened while " "initializing objects.)" ), ): -- 2.47.3