[Python-checkins] cpython (merge default -> default): merge heads

sandro.tosi python-checkins at python.org
Sat Mar 31 18:49:11 CEST 2012


http://hg.python.org/cpython/rev/40ed19ed0342
changeset:   76023:40ed19ed0342
parent:      76022:b926a8c386ad
parent:      76018:6023d73c6f87
user:        Sandro Tosi <sandro.tosi at gmail.com>
date:        Sat Mar 31 18:44:18 2012 +0200
summary:
  merge heads

files:
  Misc/NEWS          |   2 ++
  Modules/_tkinter.c |  19 ++++++++++++++++++-
  2 files changed, 20 insertions(+), 1 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,8 @@
 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
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -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);

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list