summaryrefslogtreecommitdiff
path: root/Modules/_asynciomodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_asynciomodule.c')
-rw-r--r--Modules/_asynciomodule.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index 2151f20281..f01e5884c6 100644
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -16,7 +16,6 @@ _Py_IDENTIFIER(add_done_callback);
_Py_IDENTIFIER(call_soon);
_Py_IDENTIFIER(cancel);
_Py_IDENTIFIER(get_event_loop);
-_Py_IDENTIFIER(send);
_Py_IDENTIFIER(throw);
@@ -2695,13 +2694,7 @@ task_step_impl(TaskObj *task, PyObject *exc)
int gen_status = PYGEN_ERROR;
if (exc == NULL) {
- if (PyGen_CheckExact(coro) || PyCoro_CheckExact(coro)) {
- gen_status = PyGen_Send((PyGenObject*)coro, Py_None, &result);
- }
- else {
- result = _PyObject_CallMethodIdOneArg(coro, &PyId_send, Py_None);
- gen_status = gen_status_from_result(&result);
- }
+ gen_status = PyIter_Send(coro, Py_None, &result);
}
else {
result = _PyObject_CallMethodIdOneArg(coro, &PyId_throw, exc);