From: jonathan vanasco Date: Wed, 8 Sep 2021 17:27:20 +0000 (-0400) Subject: References: #5831 X-Git-Tag: rel_1_4_24~16^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5e1cb2861637c122d0cc133f746d5c337ddb006;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git References: #5831 Add a note to docs regarding future session under asyncio Change-Id: Ib152be833dcb8ea46217e761a715f639859133c6 --- diff --git a/doc/build/orm/extensions/asyncio.rst b/doc/build/orm/extensions/asyncio.rst index c5fc356d12..98f16932c8 100644 --- a/doc/build/orm/extensions/asyncio.rst +++ b/doc/build/orm/extensions/asyncio.rst @@ -226,6 +226,16 @@ then used in a Python asynchronous context manager (i.e. ``async with:`` statement) so that it is automatically closed at the end of the block; this is equivalent to calling the :meth:`_asyncio.AsyncSession.close` method. +.. note:: :class:`_asyncio.AsyncSession` uses SQLAlchemy's future mode, which + has several potentially breaking changes. One such change is the new + default behavior of ``cascade_backrefs`` is ``False``, which may affect + how related objects are saved to the database. + + .. seealso:: + + :ref:`change_5150` + + .. _asyncio_orm_avoid_lazyloads: Preventing Implicit IO when Using AsyncSession