retrying icon indicating copy to clipboard operation
retrying copied to clipboard

Behavior with async methods?

Open BatmanAoD opened this issue 1 year ago • 2 comments

What is the expected behavior when wrapping an async method with @retry? I see that there's a separate library for retrying an async method, so presumably this non-async version won't work as expected; but is it effectively doing "nothing", or something else? (I've seen async functions decorated with @retry from this library, so I know that it doesn't throw a TypeError or anything like that.)

BatmanAoD avatar May 30 '24 21:05 BatmanAoD

The @retry decorator from this library is designed for synchronous functions only. Using this with async functions won't work at all. It is likely functionality that could be supported, but this library is not under much active maintenance by me. I mostly try to keep current functionality working and merge any useful contributions.

groodt avatar Jun 22 '25 05:06 groodt

@groodt Thanks!

...for anyone who stumbles upon this issue from Google: the tenacity fork has first-class async support.

BatmanAoD avatar Jun 23 '25 16:06 BatmanAoD