-
Notifications
You must be signed in to change notification settings - Fork 310
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
Add option to supress thread is not MTA exception #1565
Comments
@dlech However, .... if I understand correctly what you write above, this breaks Kivy (?), it breaks BeeWare (!, just tested by me) and it breaks other GUIs like tkinter although the asyncio integration might be done properly. I cannot judge what was worse, the situation before 0.22 or after 0.21. From my own perspective I would say: Please, revert this change. Or find a solution that does not break major Python frameworks by default. |
There have been at least half a dozen long standing issues of Bleak just locking up on Windows. We finally figured this out was due to importing packages with unwanted side effects. This was the best way I could figure out how to detect those unwanted side effects. But I'm not really happy with the result either. I did not expect very many people to be using Bleak with GUI's on Windows though, but maybe I was wrong!
Open to suggestions here. For example, is there a way to detect if an app is running via BeeWare at runtime? |
I asked the BeeWare authors, waiting for an answer. Actually, BeeWare is a set of different tools and libraries, the GUI part is called "toga". I read through #1132 and realized that this is a Win 11 issue. So you could possibly lift the burden from Win 10 users? Also, how about downgrading the exception to a warning? |
I got an answer from Russell Keith-Magee (@freakboy3742), the 'boss' of the BeeWare project:
|
Although, using the workaround from the troubleshooting docs might break Kivy if Kivy needs the main thread to be STA for the UI.
So we might need to add an option to avoid the exception in cases like this.
Originally posted by @dlech in #1564 (reply in thread)
If Bleak is integrated with a UI framework that has proper asyncio integration, we need to be able to avoid this exception.
The text was updated successfully, but these errors were encountered: