Repository navigation
Conversation
|
I'll now try to write a test based on @speleo3's simple_tk_demo, but this may take some time (I'm still open to review during this time, but ask it is not merged yet) |
|
I did say "try"! In short, it cannot be reasonably done. It is difficult enough to mimic a user action (e.g. moving the window) so as to trigger the Tk event, let alone doing so from a thread that Python has never seen before. It would require a lot of @serhiy-storchaka (or anyone else?!) would you mind please reviewing the PR? |
|
I would give this PR more thumbs up if I could. Is there anything I can do to help this getting approved? |
|
@serhiy-storchaka please could you review this PR (its a small, 4 line addition to |
|
@serhiy-storchaka, it would be really great to get your 👀 on this. |
|
Any updates? It is really hard to integrate python with other eventloop framework without this. |
|
If I understand correctly, this bug appears on Windows only. If so, it would be good to better understand why the bug occurs. The fact that the bug occurs in |
|
This PR is stale because it has been open for 30 days with no activity. |
|
This is the call stack leading up to the crash (last command shown first): The final command, The Here, In the call stack, you will see that we are switching from Python (in line 51) to Tcl/Tk (in line 36) outside of an The reason this happens is that the message box runs its own event loop, which handles events both for the message box and for the tkinter window. But the message box is not aware of tkinter and its intricacies, and processes events for the tkinter window by simply calling into Tcl/Tk directly (in line 36). Then from line 36 to line 2, we are in Tcl/Tk, which then tries to call into Python ( A better solution to this bug would be to use an external event loop, Tcl/Tk supports external event loops, but unfortunately tkinter does not expose this part of the Tcl/Tk API. |
|
This PR is stale because it has been open for 90 days with no activity. |
|
This PR is stale because it has been open for 90 days with no activity. |
https://bugs.python.org/issue40075