[Python-checkins] r68231 - in python/trunk: Misc/NEWS Modules/_tkinter.c

guilherme.polo python-checkins at python.org
Sat Jan 3 22:51:09 CET 2009


Author: guilherme.polo
Date: Sat Jan  3 22:51:09 2009
New Revision: 68231

Log:
The _tkinter module functions "createfilehandler", "deletefilehandler",
"createtimerhandler", "mainloop", "dooneevent" and "quit" have been
deprecated for removal in 3.x (part of issue #3638).


Modified:
   python/trunk/Misc/NEWS
   python/trunk/Modules/_tkinter.c

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Sat Jan  3 22:51:09 2009
@@ -108,6 +108,10 @@
 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()
   to the decimal module.
 

Modified: python/trunk/Modules/_tkinter.c
==============================================================================
--- python/trunk/Modules/_tkinter.c	(original)
+++ python/trunk/Modules/_tkinter.c	Sat Jan  3 22:51:09 2009
@@ -2255,6 +2255,12 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 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;
 


More information about the Python-checkins mailing list