summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/idlelib/NEWS.txt11
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/_tkinter.c14
3 files changed, 23 insertions, 5 deletions
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index deeb4a6..f84dd41 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -1,18 +1,21 @@
-What's New in IDLE 3.1.4?
+What's New in IDLE 3.2.1?
=========================
-*Release date: XX-XXX-XX*
+*Release date: 15-May-11*
+
+- Issue #1028: Ctrl-space binding to show completions was causing IDLE to exit.
+ Tk < 8.5 was sending invalid Unicode null; replaced with valid null.
- <Home> toggle failing on Tk 8.5, causing IDLE exits and strange selection
behavior. Issue 4676. Improve selection extension behaviour.
-- <Home> toggle non-functional when NumLock set on Windows. Issue 3851.
+- <Home> toggle non-functional when NumLock set on Windows. Issue 3851.
What's New in IDLE 3.1b1?
=========================
-*Release date: 27-Jun-09*
+*Release date: 06-May-09*
- Use of 'filter' in keybindingDialog.py was causing custom key assignment to
fail. Patch 5707 amaury.forgeotdarc.
diff --git a/Misc/NEWS b/Misc/NEWS
index 1e7d9ac..c9946bc 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -142,6 +142,9 @@ Core and Builtins
Library
-------
+- Issue #1028: Tk returns invalid Unicode null in %A: UnicodeDecodeError.
+ With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused
+ IDLE to exit. Converted to valid Unicode null in PythonCmd().
- Issue #11799: urllib.request Authentication Handlers will raise a ValueError
when presented with an unsupported Authentication Scheme. Patch contributed
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 91b1b53..6879975 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -2022,7 +2022,19 @@ PythonCmd(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
for (i = 0; i < (argc - 1); i++) {
PyObject *s = PyUnicode_FromString(argv[i + 1]);
- if (!s || PyTuple_SetItem(arg, i, s)) {
+ if (!s) {
+ /* Is Tk leaking 0xC080 in %A - a "modified" utf-8 null? */
+ if (PyErr_ExceptionMatches(PyExc_UnicodeDecodeError) &&
+ !strcmp(argv[i + 1], "\xC0\x80")) {
+ PyErr_Clear();
+ /* Convert to "strict" utf-8 null */
+ s = PyUnicode_FromString("\0");
+ } else {
+ Py_DECREF(arg);
+ return PythonCmd_Error(interp);
+ }
+ }
+ if (PyTuple_SetItem(arg, i, s)) {
Py_DECREF(arg);
return PythonCmd_Error(interp);
}