-
-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove __iter__ from AsyncRetring (#387)
This method doesn't make sense for AsyncRetrying. And it's even more vicious as: ``` for attempts in AsyncRetrying(): with attempts: await do_for_a_while() ``` will work, but sleep(XXX) coroutine will never be awaited and the call is retried instantly. This change removes the __iter__ method from AsyncRetrying. Co-authored-by: Julien Danjou <julien@danjou.info>
- Loading branch information
Showing
3 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
fixes: | ||
- | | ||
`AsyncRetrying` was erroneously implementing `__iter__()`, making tenacity | ||
retrying mechanism working but in a synchronous fashion and not waiting as | ||
expected. This interface has been removed, `__aiter__()` should be used | ||
instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters