Message390362
I can open a PR this evening, but I think this is close to the issue: PyIter_Next() already silences StopIteration, so checking for it afterward fails.
diff --git a/Objects/iterobject.c b/Objects/iterobject.c
index f0c6b79917..95f4659dc9 100644
--- a/Objects/iterobject.c
+++ b/Objects/iterobject.c
@@ -316,7 +316,7 @@ anextawaitable_traverse(anextawaitableobject *obj, visitproc visit, void *arg)
static PyObject *
anextawaitable_iternext(anextawaitableobject *obj)
{
- PyObject *result = PyIter_Next(obj->wrapped);
+ PyObject *result = (*Py_TYPE(obj->wrapped)->tp_iternext)(obj->wrapped);
if (result != NULL) {
return result;
} |
|
Date |
User |
Action |
Args |
2021-04-06 19:03:26 | Dennis Sweeney | set | recipients:
+ Dennis Sweeney, asvetlov, yselivanov, pewscorner |
2021-04-06 19:03:26 | Dennis Sweeney | set | messageid: <1617735806.04.0.0273592746238.issue43751@roundup.psfhosted.org> |
2021-04-06 19:03:26 | Dennis Sweeney | link | issue43751 messages |
2021-04-06 19:03:25 | Dennis Sweeney | create | |
|