From 7376cdf43eef4b038891a5902a7e0692b4bd8185 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) --- 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 99b7e60125..d590d5de73 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -3048,7 +3048,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.2