This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yhlam
Recipients paul.moore, steve.dower, tim.golden, yhlam, zach.ware
Date 2017-09-21.16:13:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Since python 3.6, PyOS_InputHook is not called when waiting for IO in Windows.

This causes issues with GUI framework like tkinter that relys on PyOS_InputHook to handle user interaction.

I attached a test script. When running the script with python 3.5, the tkinter window will show up properly. But if you run the script with python 3.6, the tkinter window will be frozen. 

I believe the issue is introduced in commit 3929499. In commit 3929499, _PyOS_WindowsConsoleReadline is added as the new Windows implementation of PyOS_StdioReadline. Originally, PyOS_StdioReadline calls my_fgets to read input, and my_fgets will call PyOS_InputHook before the calling the real fgets. However, _PyOS_WindowsConsoleReadline calls ReadConsoleW instead of my_fgets to read input, and PyOS_InputHook is never called.

The bug is first reported in matplotlib.
Date User Action Args
2017-09-21 16:13:02yhlamsetrecipients: + yhlam, paul.moore, tim.golden, zach.ware, steve.dower
2017-09-21 16:13:02yhlamsetmessageid: <>
2017-09-21 16:13:02yhlamlinkissue31546 messages
2017-09-21 16:13:02yhlamcreate