summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuilherme Polo <ggpolo@gmail.com>2009-01-03 21:51:09 (GMT)
committerGuilherme Polo <ggpolo@gmail.com>2009-01-03 21:51:09 (GMT)
commite7f140355bfcea0c0b4b284910cc05bba4d39cfe (patch)
treeeb71025380f3d8fa7f8ec0dfb8a9cb55895b8c45 /Modules
parent3b62c2ff690143d9c6119c27478c243baa1b140c (diff)
downloadcpython-e7f140355bfcea0c0b4b284910cc05bba4d39cfe.zip
cpython-e7f140355bfcea0c0b4b284910cc05bba4d39cfe.tar.gz
cpython-e7f140355bfcea0c0b4b284910cc05bba4d39cfe.tar.bz2
The _tkinter module functions "createfilehandler", "deletefilehandler",
"createtimerhandler", "mainloop", "dooneevent" and "quit" have been deprecated for removal in 3.x (part of issue #3638).
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_tkinter.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index f101450..93e7edc 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -2255,6 +2255,12 @@ Tkapp_CreateFileHandler(PyObject *self, PyObject *args)
PyObject *file, *func;
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",
&file, &mask, &func))
return NULL;
@@ -2299,6 +2305,12 @@ Tkapp_DeleteFileHandler(PyObject *self, PyObject *args)
PyObject *file;
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))
return NULL;
@@ -2472,6 +2484,12 @@ Tkapp_CreateTimerHandler(PyObject *self, PyObject *args)
PyObject *func;
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",
&milliseconds, &func))
return NULL;
@@ -2515,6 +2533,12 @@ Tkapp_MainLoop(PyObject *selfptr, PyObject *args)
PyThreadState *tstate = PyThreadState_Get();
#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))
return NULL;
@@ -2590,6 +2614,12 @@ Tkapp_DoOneEvent(PyObject *self, PyObject *args)
int flags = 0;
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))
return NULL;
@@ -2603,6 +2633,12 @@ static PyObject *
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"))
return NULL;