bpo-36933: Remove sys.set_coroutine_wrapper (marked for removal in 3.8) (GH-13577)

It has been documented as deprecated and to be removed in 3.8; 

From a comment on another thread – which I can't find ; leave get_coro_wrapper() for now, but always return `None`.


https://bugs.python.org/issue36933
This commit is contained in:
Matthias Bussonnier 2019-05-28 00:10:59 -07:00 committed by Miss Islington (bot)
parent 436c2b0d67
commit 3880f263d2
11 changed files with 7 additions and 287 deletions

View file

@ -510,33 +510,6 @@ exit:
return return_value;
}
PyDoc_STRVAR(sys_set_coroutine_wrapper__doc__,
"set_coroutine_wrapper($module, wrapper, /)\n"
"--\n"
"\n"
"Set a wrapper for coroutine objects.");
#define SYS_SET_COROUTINE_WRAPPER_METHODDEF \
{"set_coroutine_wrapper", (PyCFunction)sys_set_coroutine_wrapper, METH_O, sys_set_coroutine_wrapper__doc__},
PyDoc_STRVAR(sys_get_coroutine_wrapper__doc__,
"get_coroutine_wrapper($module, /)\n"
"--\n"
"\n"
"Return the wrapper for coroutines set by sys.set_coroutine_wrapper.");
#define SYS_GET_COROUTINE_WRAPPER_METHODDEF \
{"get_coroutine_wrapper", (PyCFunction)sys_get_coroutine_wrapper, METH_NOARGS, sys_get_coroutine_wrapper__doc__},
static PyObject *
sys_get_coroutine_wrapper_impl(PyObject *module);
static PyObject *
sys_get_coroutine_wrapper(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return sys_get_coroutine_wrapper_impl(module);
}
PyDoc_STRVAR(sys_get_asyncgen_hooks__doc__,
"get_asyncgen_hooks($module, /)\n"
"--\n"
@ -1109,4 +1082,4 @@ sys_getandroidapilevel(PyObject *module, PyObject *Py_UNUSED(ignored))
#ifndef SYS_GETANDROIDAPILEVEL_METHODDEF
#define SYS_GETANDROIDAPILEVEL_METHODDEF
#endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */
/*[clinic end generated code: output=03da2eb03135d9f2 input=a9049054013a1b77]*/
/*[clinic end generated code: output=43c4fde7b5783d8d input=a9049054013a1b77]*/