]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix typo: `async_attrs` to `awaitable_attrs` (#9961)
authorAlc-Alc <45509143+Alc-Alc@users.noreply.github.com>
Sat, 17 Jun 2023 09:59:48 +0000 (15:29 +0530)
committerGitHub <noreply@github.com>
Sat, 17 Jun 2023 09:59:48 +0000 (11:59 +0200)
Co-authored-by: Alc <alc@localhost>
lib/sqlalchemy/ext/asyncio/session.py

index 72a98f576b6386e707d166454aaf7eeec8862353..6cab56baa91f72c6e0048b6c3db507e3da08fccd 100644 (file)
@@ -121,9 +121,9 @@ class AsyncAttrs:
 
         a1 = (await async_session.scalars(select(A).where(A.id == 5))).one()
 
-        # use the lazy loader on ``a1.bs`` via the ``.async_attrs``
+        # use the lazy loader on ``a1.bs`` via the ``.awaitable_attrs``
         # interface, so that it may be awaited
-        for b1 in await a1.async_attrs.bs:
+        for b1 in await a1.awaitable_attrs.bs:
             print(b1)
 
     The :attr:`_asyncio.AsyncAttrs.awaitable_attrs` performs a call against the
@@ -160,8 +160,8 @@ class AsyncAttrs:
 
             a1 = (await async_session.scalars(select(A).where(A.id == 5))).one()
 
-            some_attribute = await a1.async_attrs.some_deferred_attribute
-            some_collection = await a1.async_attrs.some_collection
+            some_attribute = await a1.awaitable_attrs.some_deferred_attribute
+            some_collection = await a1.awaitable_attrs.some_collection
 
         """  # noqa: E501