From: Sillocan Date: Wed, 2 Jul 2025 21:20:47 +0000 (-0700) Subject: chore: Fix typo in autoflush warning (#12713) X-Git-Tag: rel_2_0_42~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f183d70d1b4299969d5ea8bf33b2943b82378367;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git chore: Fix typo in autoflush warning (#12713) (cherry picked from commit 7376cdf43eef4b038891a5902a7e0692b4bd8185) --- 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.)" ), ):