Whole file
jd/tenacity
The author described this change as “fix: remove __iter__ from AsyncRetring (#387)”. It counts as a record because the check below fails on the code as it stood at b93e4dca9 and passes on 78c8d4bc8, with nothing else changed between the two runs.
Projectjd/tenacity
Fix saved2023-02-06
Sharing licenceApache-2.0 · LICENSE
Change size+3 −0
What the code was meant to do, written into the code itself as a save note
fix: remove __iter__ from AsyncRetring (#387)
The change
| 62 | 62 | else: | |
| 63 | 63 | return do # type: ignore[no-any-return] | |
| 64 | 64 | ||
| 65 | + | def __iter__(self) -> typing.Generator[AttemptManager, None, None]: | |
| 66 | + | raise TypeError("AsyncRetrying object is not iterable") | |
| 67 | + | ||
| 65 | 68 | def __aiter__(self) -> "AsyncRetrying": | |
| 66 | 69 | self.begin() | |
| 67 | 70 | self._retry_state = RetryCallState(self, fn=None, args=(), kwargs={}) |
The check that tells the two apart
fail→pass·tests/test_asyncio.py::TestContextManager::test_async_retying_iterator
Check file tests/test_asyncio.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before itb93e4dca90cbadfc7db10c23253b4010b991b58f
Broken version dated2023-02-06
Moduletenacity._asyncio
Units changedAsyncRetrying
Fingerprint1a8f8a3fac1e94ea
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.