summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-05-07 12:07:32 (GMT)
committerGitHub <noreply@github.com>2024-05-07 12:07:32 (GMT)
commit65f5e586a1239ed1a66d8284773d7b02ce40e480 (patch)
tree2df752dc79daf89283ed5b01c1b9a8a37abed9a3 /Misc
parentb60d4c0d53b6aafbf4a6e560b4cb6f1d5c7240c8 (diff)
downloadcpython-65f5e586a1239ed1a66d8284773d7b02ce40e480.zip
cpython-65f5e586a1239ed1a66d8284773d7b02ce40e480.tar.gz
cpython-65f5e586a1239ed1a66d8284773d7b02ce40e480.tar.bz2
gh-66410: Do not stringify arguments of Tkinter callback (GH-98592)
Callbacks registered in the tkinter module now take arguments as various Python objects (int, float, bytes, tuple), not just str. To restore the previous behavior set tkinter module global wantobject to 1 before creating the Tk object or call the wantobject() method of the Tk object with argument 1. Calling it with argument 2 restores the current default behavior.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2022-10-24-12-05-19.gh-issue-66410.du4UKW.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2022-10-24-12-05-19.gh-issue-66410.du4UKW.rst b/Misc/NEWS.d/next/Library/2022-10-24-12-05-19.gh-issue-66410.du4UKW.rst
new file mode 100644
index 0000000..044fd18
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-10-24-12-05-19.gh-issue-66410.du4UKW.rst
@@ -0,0 +1,7 @@
+Callbacks registered in the :mod:`tkinter` module now take arguments as
+various Python objects (``int``, ``float``, ``bytes``, ``tuple``), not just
+``str``. To restore the previous behavior set :mod:`!tkinter` module global
+:data:`~tkinter.wantobject` to ``1`` before creating the
+:class:`~tkinter.Tk` object or call the :meth:`~tkinter.Tk.wantobject`
+method of the :class:`!Tk` object with argument ``1``. Calling it with
+argument ``2`` restores the current default behavior.