-
-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support async actions #437
Conversation
|
tenacity/_asyncio.py
Outdated
@@ -30,6 +31,15 @@ | |||
WrappedFn = t.TypeVar("WrappedFn", bound=t.Callable[..., t.Awaitable[t.Any]]) | |||
|
|||
|
|||
def is_coroutine_callable(call: t.Callable[..., t.Any]) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have unit tests around this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call! I ended up moving the function to _utils
and slightly amending it (odd partial
behaviour in 3.8 and 3.9, even though docs say otherwise). wdyt? 2616c4a
323c008
to
2616c4a
Compare
@jd any more thoughts on this? Happy to clarify anything else I may have missed. |
@jd I merged changes from |
@jd now that this is merged, do you think it's ready to be released in a new version? Or would you rather see some async strategies merged first too? |
Fixes #249 #412
Second PR after breaking down #433 (follows #434)
Add async strategies hasier/tenacity#2Add async strategies #451After DRYing the
iter()
function, makeAsyncRetrying
supportasync
callbacks.Supersedes hasier#1