]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix issue #5136: deprecate old unused functions from tkinter.
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Sat, 31 Mar 2012 16:36:39 +0000 (19:36 +0300)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Sat, 31 Mar 2012 16:36:39 +0000 (19:36 +0300)
These functions are not documnted, so no documentation update.

Misc/NEWS
Modules/_tkinter.c

index a7ab2dca726cc29772d8fb3466b77e656d4eee6e..9095045a5101b9bb2d07fd1d410b4d70fbf2ff58 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #5136: deprecated old, unused functions from tkinter.
+
 - Issue #14409: IDLE now properly executes commands in the Shell window
   when it cannot read the normal config files on startup and
   has to use the built-in default key bindings.
index abbe0ec7bbc5476fec3dc9085838cd470cedd3f5..630ce7214f1bf2f66d7b3a1bb81d481d032bb0b3 100644 (file)
@@ -1343,6 +1343,11 @@ Tkapp_GlobalCall(PyObject *self, PyObject *args)
     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 @@ Tkapp_GlobalEval(PyObject *self, PyObject *args)
     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 @@ Tkapp_Split(PyObject *self, PyObject *args)
 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);