Commit 74c17539 authored by INADA Naoki's avatar INADA Naoki

Issue #28430: Fix iterator of C implemented asyncio.Future doesn't

accept non-None value is passed to it.send(val).
parent c3adf1e0
...@@ -29,6 +29,9 @@ Core and Builtins ...@@ -29,6 +29,9 @@ Core and Builtins
Library Library
------- -------
- Issue #28430: Fix iterator of C implemented asyncio.Future doesn't accept
non-None value is passed to it.send(val).
- Issue #27025: Generated names for Tkinter widgets now start by the "!" prefix - Issue #27025: Generated names for Tkinter widgets now start by the "!" prefix
for readability (was "`"). for readability (was "`").
......
...@@ -815,13 +815,11 @@ FutureIter_iternext(futureiterobject *it) ...@@ -815,13 +815,11 @@ FutureIter_iternext(futureiterobject *it)
} }
static PyObject * static PyObject *
FutureIter_send(futureiterobject *self, PyObject *arg) FutureIter_send(futureiterobject *self, PyObject *unused)
{ {
if (arg != Py_None) { /* Future.__iter__ doesn't care about values that are pushed to the
PyErr_Format(PyExc_TypeError, * generator, it just returns "self.result().
"can't send non-None value to a FutureIter"); */
return NULL;
}
return FutureIter_iternext(self); return FutureIter_iternext(self);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment