Closed hasier closed 10 months ago
⚠️ No release notes detected. Please make sure to use reno to add a changelog entry.
Is there a way to split that in smaller changes? It's a bit large to review as is, even if it looks great
Is there a way to split that in smaller changes? It's a bit large to review as is, even if it looks great
@jd fair point. I have split it into 3 PRs, hopefully this works for you.
main
instead.main
instead.
Fixes #249 Follows up on #289 #363
I took a stab at DRYing the
iter()
function in order to supportasync
callbacks, and once those were possible, I thought it would also make sense to allow forasync
strategies.The approach I have taken is to build a list of actions that
iter()
needs to go through, where each action is just a piece of the whole current logic, and each step can further extend the list of actions. 3 pieces have been taken out to redefine in specific Retrying implementations, i.e.asyncio
. This way we can make sure we use coroutines for those calls, as well as dynamically wrapping each function as a coroutine, allowing for both sync and async strategies and callbacks.I tried to make somewhat meaningful commits, it should be easier to review commit-by-commit.
I appreciate the new approach looks quite odd and is not very intuitive to follow, happy to take some feedback and improve it if anyone has some other ideas.