Support async actions
Fixes #249 #412
Second PR after breaking down https://github.com/jd/tenacity/pull/433 (follows https://github.com/jd/tenacity/pull/434)
- First PR https://github.com/jd/tenacity/pull/434
- Third PR https://github.com/hasier/tenacity/pull/2
After DRYing the iter() function, make AsyncRetrying support async callbacks.
Supersedes https://github.com/hasier/tenacity/pull/1
⚠️ No release notes detected. Please make sure to use reno to add a changelog entry.
@jd any more thoughts on this? Happy to clarify anything else I may have missed.
@jd I merged changes from main and tests seem to pass, feel free to re-approve and merge whenever you prefer 🙂
@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? ~The only issue I see with that is how we'd solve sync+async combinations 🤔~ Gave a go at fixing the sync+async issue and it seems to be working, let me know what you think! https://github.com/jd/tenacity/pull/451