GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — gh-66410: Do not stringify arguments of Tkinter callback by serhiy-storchaka · Pull Request #98592 · python/cpython Conversation
|
|
I did a first read. I think the news/new messages could be clearer, but need to think more about a suggestion. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The IDLE tests exposed two failures. One is specific to IDLE, its clever use of redefining the Tcl command corresponded to a widget. It is not typical use of Tkinter and I do not think that many other code will have such issue. Other one is more generic, related to creating the Event objects, it would affect more code. We need to add special Event-related code in Tkinter tests and check what more can be affected by this change. This is why this PR is still a draft. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…nGH-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.
It was set to 2 in 65f5e58 (pythonGH-98592).
pythonGH-118784) It was set to 2 in 65f5e58 (pythonGH-98592). (cherry picked from commit e188527) Co-authored-by: Serhiy Storchaka <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Tkinter: Don't stringify callback arguments
There was an error while loading. Please reload this page.