summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-03-31 19:36:39 +0300
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-03-31 19:36:39 +0300
commit9e892bbf28a2797c251a89805a18e006b95623f3 (patch)
treee5a60cd40a5aecd15a3263785946266f5a429538
parent8613b0dea4b5150539853e32afd5b5c53be07e5e (diff)
downloadcpython-git-9e892bbf28a2797c251a89805a18e006b95623f3.tar.gz
fix issue #5136: deprecate old unused functions from tkinter.
These functions are not documnted, so no documentation update.
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/_tkinter.c19
2 files changed, 20 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index a7ab2dca72..9095045a51 100644
--- 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.
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index abbe0ec7bb..630ce7214f 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -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);