Skip to content

Fix threading in calling PyOS_InputHook from new REPL - #80

Closed
mdboom wants to merge 2 commits into
pablogsal:gh-119842from
mdboom:gh-119842
Closed

mdboom wants to merge 2 commits into
pablogsal:gh-119842from
mdboom:gh-119842

Conversation

@mdboom

@mdboom mdboom commented May 31, 2024

Copy link
Copy Markdown

Just a proof-of-concept for what seems to make this work.

Since the PyOS_InputHook implementation in Tkinter sets the thread state, we need to allow threads around calling it. I'm not sure that's possible directly from Python (maybe it is), so I just added a C function to handle this. This seems to make things work correctly, at least for matplotlib and the Tkinter reproducer here.

I'm not sure the new function is in the right file.

@pablogsal
pablogsal force-pushed the gh-119842 branch 4 times, most recently from ed164d7 to d4ab42a Compare June 1, 2024 13:27
@pablogsal
pablogsal deleted the branch pablogsal:gh-119842 September 24, 2026 17:36
@pablogsal pablogsal closed this Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants