mirror of https://github.com/python/cpython
The _tkinter module functions "createfilehandler", "deletefilehandler",
"createtimerhandler", "mainloop", "dooneevent" and "quit" have been deprecated for removal in 3.x (part of issue #3638).
This commit is contained in:
parent
3b62c2ff69
commit
e7f140355b
|
@ -108,6 +108,10 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- The _tkinter module functions "createfilehandler", "deletefilehandler",
|
||||||
|
"createtimerhandler", "mainloop", "dooneevent" and "quit" have been
|
||||||
|
deprecated for removal in 3.x
|
||||||
|
|
||||||
- Issue #4796: Added Decimal.from_float() and Context.create_decimal_from_float()
|
- Issue #4796: Added Decimal.from_float() and Context.create_decimal_from_float()
|
||||||
to the decimal module.
|
to the decimal module.
|
||||||
|
|
||||||
|
|
|
@ -2255,6 +2255,12 @@ Tkapp_CreateFileHandler(PyObject *self, PyObject *args)
|
||||||
PyObject *file, *func;
|
PyObject *file, *func;
|
||||||
int mask, tfile;
|
int mask, tfile;
|
||||||
|
|
||||||
|
if (!self && Py_Py3kWarningFlag) {
|
||||||
|
if (PyErr_Warn(PyExc_DeprecationWarning,
|
||||||
|
"_tkinter.createfilehandler is gone in 3.x") < 0)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "OiO:createfilehandler",
|
if (!PyArg_ParseTuple(args, "OiO:createfilehandler",
|
||||||
&file, &mask, &func))
|
&file, &mask, &func))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -2299,6 +2305,12 @@ Tkapp_DeleteFileHandler(PyObject *self, PyObject *args)
|
||||||
PyObject *file;
|
PyObject *file;
|
||||||
int tfile;
|
int tfile;
|
||||||
|
|
||||||
|
if (!self && Py_Py3kWarningFlag) {
|
||||||
|
if (PyErr_Warn(PyExc_DeprecationWarning,
|
||||||
|
"_tkinter.deletefilehandler is gone in 3.x") < 0)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "O:deletefilehandler", &file))
|
if (!PyArg_ParseTuple(args, "O:deletefilehandler", &file))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -2472,6 +2484,12 @@ Tkapp_CreateTimerHandler(PyObject *self, PyObject *args)
|
||||||
PyObject *func;
|
PyObject *func;
|
||||||
TkttObject *v;
|
TkttObject *v;
|
||||||
|
|
||||||
|
if (!self && Py_Py3kWarningFlag) {
|
||||||
|
if (PyErr_Warn(PyExc_DeprecationWarning,
|
||||||
|
"_tkinter.createtimerhandler is gone in 3.x") < 0)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "iO:createtimerhandler",
|
if (!PyArg_ParseTuple(args, "iO:createtimerhandler",
|
||||||
&milliseconds, &func))
|
&milliseconds, &func))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -2515,6 +2533,12 @@ Tkapp_MainLoop(PyObject *selfptr, PyObject *args)
|
||||||
PyThreadState *tstate = PyThreadState_Get();
|
PyThreadState *tstate = PyThreadState_Get();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (!self && Py_Py3kWarningFlag) {
|
||||||
|
if (PyErr_Warn(PyExc_DeprecationWarning,
|
||||||
|
"_tkinter.mainloop is gone in 3.x") < 0)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "|i:mainloop", &threshold))
|
if (!PyArg_ParseTuple(args, "|i:mainloop", &threshold))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -2590,6 +2614,12 @@ Tkapp_DoOneEvent(PyObject *self, PyObject *args)
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
int rv;
|
int rv;
|
||||||
|
|
||||||
|
if (!self && Py_Py3kWarningFlag) {
|
||||||
|
if (PyErr_Warn(PyExc_DeprecationWarning,
|
||||||
|
"_tkinter.dooneevent is gone in 3.x") < 0)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "|i:dooneevent", &flags))
|
if (!PyArg_ParseTuple(args, "|i:dooneevent", &flags))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -2603,6 +2633,12 @@ static PyObject *
|
||||||
Tkapp_Quit(PyObject *self, PyObject *args)
|
Tkapp_Quit(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (!self && Py_Py3kWarningFlag) {
|
||||||
|
if (PyErr_Warn(PyExc_DeprecationWarning,
|
||||||
|
"_tkinter.createfilehandler is gone in 3.x") < 0)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, ":quit"))
|
if (!PyArg_ParseTuple(args, ":quit"))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue