-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Honor PyOS_InputHook in the new REPL #119842
Comments
Signed-off-by: Pablo Galindo <[email protected]>
Here's a good reproducer to ensure your changes are working (on Linux): (
If working, a window should appear with a plot in it, and it should respond to mouse events etc. It seems that on CPython main, this is broken, but works with Cc: @tacaswell, do I have this right? IIUC this works due to Tkinter's built-in use of PyOS_InputHook, matplotlib itself doesn't touch it. EDIT: See a simpler reproducer below |
With #119843 (currently), this fails with:
|
Here's a much easier reproducer with no external dependencies:
Current behavior I'm seeing: CPython main: No window |
@mdboom Correct. PyQt, wxpython, and the gtk bindings all provide their own verision of To be 100% sure the event loop is running as expected also add a "print on click" callback: from tkinter import *
root = Tk()
b = Button(root, text='bar', command=lambda: print('bob'))
w = Label(root, text='Foo')
b.pack()
w.pack() |
Signed-off-by: Pablo Galindo <[email protected]>
Signed-off-by: Pablo Galindo <[email protected]>
Signed-off-by: Pablo Galindo <[email protected]>
Signed-off-by: Pablo Galindo <[email protected]>
Signed-off-by: Pablo Galindo <[email protected]> Co-authored-by: Łukasz Langa <[email protected]> Co-authored-by: Michael Droettboom <[email protected]>
…H-119843) (cherry picked from commit d909519) Co-authored-by: Pablo Galindo Salgado <[email protected]> Signed-off-by: Pablo Galindo <[email protected]> Co-authored-by: Łukasz Langa <[email protected]> Co-authored-by: Michael Droettboom <[email protected]>
…H-120066) (cherry picked from commit d909519) Signed-off-by: Pablo Galindo <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]> Co-authored-by: Michael Droettboom <[email protected]>
Signed-off-by: Pablo Galindo <[email protected]> Co-authored-by: Łukasz Langa <[email protected]> Co-authored-by: Michael Droettboom <[email protected]>
Signed-off-by: Pablo Galindo <[email protected]> Co-authored-by: Łukasz Langa <[email protected]> Co-authored-by: Michael Droettboom <[email protected]>
Signed-off-by: Pablo Galindo <[email protected]> Co-authored-by: Łukasz Langa <[email protected]> Co-authored-by: Michael Droettboom <[email protected]>
Bug report
We are currently not calling
PyOS_InputHook
if is set before blocking for input in the new REPLLinked PRs
The text was updated successfully, but these errors were encountered: