summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-02-18 11:03:07 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-02-18 11:03:07 (GMT)
commit2cca36ed3c5b190cd40fdab1cb6af04967e2cace (patch)
tree5163da44014056f4d4701c23666fd7a5f3436231
parent2a47954895b8a8cb0f63e4dbf957cd3f48e84d16 (diff)
parentdf4aa642a5d13ddd5646495fcefd2a92aaf07e74 (diff)
downloadcpython-2cca36ed3c5b190cd40fdab1cb6af04967e2cace.zip
cpython-2cca36ed3c5b190cd40fdab1cb6af04967e2cace.tar.gz
cpython-2cca36ed3c5b190cd40fdab1cb6af04967e2cace.tar.bz2
Issue #13153: Tkinter functions now raise TclError instead of ValueError when
a string argument contains non-BMP character.
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/_tkinter.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 14c89ca..98d4e24 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -257,6 +257,9 @@ Core and Builtins
Library
-------
+- Issue #13153: Tkinter functions now raise TclError instead of ValueError when
+ a string argument contains non-BMP character.
+
- Issue #9669: Protect re against infinite loops on zero-width matching in
non-greedy repeat. Patch by Matthew Barnett.
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index bb689fc..eb14827 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -870,7 +870,7 @@ AsObj(PyObject *value)
#if TCL_UTF_MAX == 3
if (ch >= 0x10000) {
/* Tcl doesn't do UTF-16, yet. */
- PyErr_Format(PyExc_ValueError,
+ PyErr_Format(Tkinter_TclError,
"character U+%x is above the range "
"(U+0000-U+FFFF) allowed by Tcl",
ch);