summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2018-01-24 16:31:01 (GMT)
committerGitHub <noreply@github.com>2018-01-24 16:31:01 (GMT)
commit22feeb88b473b288950cdb2f6c5d28692274b5f9 (patch)
tree805ea2b2b684bb331f1205f1347b5b60e1dfd2db /Modules/clinic
parent8ded5b803705328749622256701b3f08a9d6c5ab (diff)
downloadcpython-22feeb88b473b288950cdb2f6c5d28692274b5f9.zip
cpython-22feeb88b473b288950cdb2f6c5d28692274b5f9.tar.gz
cpython-22feeb88b473b288950cdb2f6c5d28692274b5f9.tar.bz2
bpo-32643: Drop support for a few private Task and Future APIs. (#5293)
Specifically, it's not possible to subclass Task/Future classes and override the following methods: * Future._schedule_callbacks * Task._step * Task._wakeup
Diffstat (limited to 'Modules/clinic')
-rw-r--r--Modules/clinic/_asynciomodule.c.h77
1 files changed, 1 insertions, 76 deletions
diff --git a/Modules/clinic/_asynciomodule.c.h b/Modules/clinic/_asynciomodule.c.h
index 9fc9d6b..d8e1b6a 100644
--- a/Modules/clinic/_asynciomodule.c.h
+++ b/Modules/clinic/_asynciomodule.c.h
@@ -252,23 +252,6 @@ _asyncio_Future__repr_info(FutureObj *self, PyObject *Py_UNUSED(ignored))
return _asyncio_Future__repr_info_impl(self);
}
-PyDoc_STRVAR(_asyncio_Future__schedule_callbacks__doc__,
-"_schedule_callbacks($self, /)\n"
-"--\n"
-"\n");
-
-#define _ASYNCIO_FUTURE__SCHEDULE_CALLBACKS_METHODDEF \
- {"_schedule_callbacks", (PyCFunction)_asyncio_Future__schedule_callbacks, METH_NOARGS, _asyncio_Future__schedule_callbacks__doc__},
-
-static PyObject *
-_asyncio_Future__schedule_callbacks_impl(FutureObj *self);
-
-static PyObject *
-_asyncio_Future__schedule_callbacks(FutureObj *self, PyObject *Py_UNUSED(ignored))
-{
- return _asyncio_Future__schedule_callbacks_impl(self);
-}
-
PyDoc_STRVAR(_asyncio_Task___init____doc__,
"Task(coro, *, loop=None)\n"
"--\n"
@@ -501,64 +484,6 @@ exit:
return return_value;
}
-PyDoc_STRVAR(_asyncio_Task__step__doc__,
-"_step($self, /, exc=None)\n"
-"--\n"
-"\n");
-
-#define _ASYNCIO_TASK__STEP_METHODDEF \
- {"_step", (PyCFunction)_asyncio_Task__step, METH_FASTCALL|METH_KEYWORDS, _asyncio_Task__step__doc__},
-
-static PyObject *
-_asyncio_Task__step_impl(TaskObj *self, PyObject *exc);
-
-static PyObject *
-_asyncio_Task__step(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
-{
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"exc", NULL};
- static _PyArg_Parser _parser = {"|O:_step", _keywords, 0};
- PyObject *exc = Py_None;
-
- if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
- &exc)) {
- goto exit;
- }
- return_value = _asyncio_Task__step_impl(self, exc);
-
-exit:
- return return_value;
-}
-
-PyDoc_STRVAR(_asyncio_Task__wakeup__doc__,
-"_wakeup($self, /, fut)\n"
-"--\n"
-"\n");
-
-#define _ASYNCIO_TASK__WAKEUP_METHODDEF \
- {"_wakeup", (PyCFunction)_asyncio_Task__wakeup, METH_FASTCALL|METH_KEYWORDS, _asyncio_Task__wakeup__doc__},
-
-static PyObject *
-_asyncio_Task__wakeup_impl(TaskObj *self, PyObject *fut);
-
-static PyObject *
-_asyncio_Task__wakeup(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
-{
- PyObject *return_value = NULL;
- static const char * const _keywords[] = {"fut", NULL};
- static _PyArg_Parser _parser = {"O:_wakeup", _keywords, 0};
- PyObject *fut;
-
- if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
- &fut)) {
- goto exit;
- }
- return_value = _asyncio_Task__wakeup_impl(self, fut);
-
-exit:
- return return_value;
-}
-
PyDoc_STRVAR(_asyncio_Task_set_result__doc__,
"set_result($self, result, /)\n"
"--\n"
@@ -786,4 +711,4 @@ _asyncio__leave_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs,
exit:
return return_value;
}
-/*[clinic end generated code: output=bcbaf1b2480f4aa9 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b6148b0134e7a819 input=a9049054013a1b77]*/