tenacity
tenacity copied to clipboard
Add `__aexit__`and `__aenter__` to AttemptManager
AttemptManager currently doesn't support async context manager protocol, requiring nesting two times instead of one if you want to use an async context manager with retrying:
async for attempt in retrying:
with retrying:
async with ratelimit:
...
Because AttemptManager doesn't do any IO I think it should be ok to just call into sync __enter__ and __exit_