@util.langhelpers.tag_method_for_warnings(
"This warning originated from the Session 'autoflush' process, "
"which was invoked automatically in response to a user-initiated "
- "operation.",
+ "operation. Consider using ``no_autoflush`` context manager if this "
+ "warning happended while initializing objects.",
sa_exc.SAWarning,
)
def _autoflush(self) -> None:
+ re.escape(
"(This warning originated from the Session 'autoflush' "
"process, which was invoked automatically in response to a "
- "user-initiated operation.)"
+ "user-initiated operation. Consider using ``no_autoflush`` "
+ "context manager if this warning happended while "
+ "initializing objects.)"
),
):
sess.execute(select(Foo))