Skip to content
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

bpo-40075: Fix _tkinter resuming null thread state #22453

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

E-Paine
Copy link
Contributor

@E-Paine E-Paine commented Sep 29, 2020

@E-Paine
Copy link
Contributor Author

E-Paine commented Sep 29, 2020

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)

@E-Paine
Copy link
Contributor Author

E-Paine commented Sep 30, 2020

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 ctypes calls, likely require some of the test code to be written in C and would be a pain to maintain in and of itself (hence it is not worth pursuing).

@serhiy-storchaka (or anyone else?!) would you mind please reviewing the PR?

@E-Paine E-Paine changed the title bpo-40075: Acquire GIL before getting thread state bpo-40075: Fix _tkinter resuming null thread state Sep 30, 2020
@speleo3
Copy link

speleo3 commented Dec 15, 2020

I would give this PR more thumbs up if I could. Is there anything I can do to help this getting approved?

@E-Paine
Copy link
Contributor Author

E-Paine commented Dec 15, 2020

@serhiy-storchaka please could you review this PR (its a small, 4 line addition to ENTER_PYTHON)

@taleinat
Copy link
Contributor

@serhiy-storchaka, it would be really great to get your 👀 on this.

@pbk20191
Copy link

Any updates? It is really hard to integrate python with other eventloop framework without this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants