Allow asynchronous callbacks for async retries.#355
Allow asynchronous callbacks for async retries.#355
Conversation
1363916 to
7f72b80
Compare
d65ff91 to
f0cf38f
Compare
|
|
||
| class AsyncRetrying(BaseRetrying): | ||
| def __init__(self, sleep: typing.Callable[[float], typing.Awaitable] = sleep, **kwargs: typing.Any) -> None: | ||
| def __init__(self, sleep: Callable[[float], Awaitable] = aio_sleep, **kwargs: Any) -> None: |
There was a problem hiding this comment.
There are too many changes that are unrelated to this PR.
Could you avoid changing code that does not need to be changed?
There was a problem hiding this comment.
It was giving warnings because variable and function had same names (sleep), should I make another PR for this?
There was a problem hiding this comment.
Also, writing typing. before types every time made some lines too long, and it was looking unnecessary, should I revert that one too?
There was a problem hiding this comment.
Yes, anything that is not related to the change should be avoided.
There was a problem hiding this comment.
sorry for late response, I will try to find time in upcoming days and split this PR into 2 different PRs.
There was a problem hiding this comment.
I created a new PR with AsyncRetries related changes #363
Will make another PR for coding style improvements after that.
Closing this PR (will use this branch as template)
This change will allow both async and sync functions to be used as callable parameters for Async retries.
Docs are not updated, please, inform if any other changes are needed. Thank you very much for your review.
Fixes #249