The GitHub Actions job "Build and Deploy Site" on burr.git/main has succeeded.
Run started by GitHub user skrawcz (triggered by skrawcz).

Head commit for run:
e6f03974a5db50f1d790610b5ee5020b913c03df / AndrĂ© Ahlert <[email protected]>
fix: support `async with` on async persister factory methods (#681)

* fix: support `async with` on async persister factory methods

`AsyncSQLitePersister.from_values()` and 
`AsyncPostgreSQLPersister.from_values()`
were async classmethods returning coroutines, which cannot be used directly
with `async with`. This wraps them in `_AsyncPersisterContextManager` that
supports both `await` (backwards compatible) and `async with` protocols.

Closes #546

* refactor: move _AsyncPersisterContextManager to burr/common/async_utils.py 
and add tests

Address review feedback:
- Move _AsyncPersisterContextManager from b_aiosqlite.py to
  burr/common/async_utils.py to avoid cross-dependency between
  unrelated integrations
- Add type annotation to coro parameter
- Add tests for async with pattern on from_values and from_config

* fix: guard against __aexit__ crash and double consumption in context manager 
wrapper

- __aexit__ now returns False when __aenter__ failed (persister is None),
  preventing AttributeError that would mask the original exception
- Add _consumed flag to prevent silent coroutine reuse, raising
  RuntimeError with clear message on second await/async with
- Add tests for both edge cases

* docs: fix async persister examples and remove redundant test helpers

- Add missing `await` to from_values() calls in parallelism.rst docs
- Remove AsyncSQLiteContextManager helper class from both test files,
  now that from_values() natively supports async with
- Replace deprecated .close() calls with .cleanup() in test fixtures

* style: fix black formatting and isort import order

* style: reformat with black 23.11.0 (project version)

* ci: trigger workflow rerun

Report URL: https://github.com/apache/burr/actions/runs/23692362868

With regards,
GitHub Actions via GitBox

Reply via email to