diff Modules/_tkinter.c @ 76018:6023d73c6f87

fix issue #5136: deprecate old unused functions from tkinter. These functions are not documnted, so no documentation update.
author Andrew Svetlov <andrew.svetlov@gmail.com>
date Sat, 31 Mar 2012 19:36:39 +0300
parents 7cbc48324938
children b2dac78db1c9
line wrap: on
line diff
--- a/Modules/_tkinter.c	Sat Mar 31 12:08:59 2012 -0400
+++ b/Modules/_tkinter.c	Sat Mar 31 19:36:39 2012 +0300
@@ -1343,6 +1343,11 @@
     char *cmd;
     PyObject *res = NULL;
 
+    if (PyErr_WarnEx(PyExc_DeprecationWarning,
+                     "globalcall is deprecated and will be removed in 3.4",
+                     1) < 0)
+        return 0;
+
     CHECK_TCL_APPARTMENT;
 
     cmd  = Merge(args);
@@ -1392,6 +1397,11 @@
     PyObject *res = NULL;
     int err;
 
+    if (PyErr_WarnEx(PyExc_DeprecationWarning,
+                     "globaleval is deprecated and will be removed in 3.4",
+                     1) < 0)
+        return 0;
+
     if (!PyArg_ParseTuple(args, "s:globaleval", &script))
         return NULL;
 
@@ -1954,9 +1964,16 @@
 static PyObject *
 Tkapp_Merge(PyObject *self, PyObject *args)
 {
-    char *s = Merge(args);
+    char *s;
     PyObject *res = NULL;
 
+    if (PyErr_WarnEx(PyExc_DeprecationWarning,
+                     "merge is deprecated and will be removed in 3.4",
+                     1) < 0)
+        return 0;
+
+    s = Merge(args);
+
     if (s) {
         res = PyUnicode_FromString(s);
         ckfree(s);