andreahlert commented on code in PR #681:
URL: https://github.com/apache/burr/pull/681#discussion_r2981225831
##########
burr/integrations/persisters/b_aiosqlite.py:
##########
@@ -33,6 +33,32 @@
Self = None
+class _AsyncPersisterContextManager:
+ """Wraps an async coroutine that returns a persister so it can be used
+ directly with ``async with``::
+
+ async with AsyncSQLitePersister.from_values(...) as persister:
+ ...
+
+ The wrapper awaits the coroutine on ``__aenter__`` and delegates
+ ``__aexit__`` to the persister's own ``__aexit__``.
+ """
+
Review Comment:
Added!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]