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

backends/winrt: don't throw exception for properly configured GUI apps #1581

Merged
merged 11 commits into from
Jun 1, 2024

Commits on May 23, 2024

  1. backends/winrt: don't throw exeception for properly configued GUI apps

    In commit 4a653e6 ("backends/winrt: raise exception when trying to scan
    with STA") we added a check to raise an exception when trying to scan
    when PyWinRT set the aparatment model to STA. However, properly working
    GUI apps will have the apartment model set to STA but Bleak will still
    work because there is something pumping the Windows message loop.
    
    We don't want to raise an exception in this case to avoid breaking
    working apps. We can improve the test by checking if the current thread
    is actually pumping the message loop by scheduling a callback via a
    the win32 SetTimeout function. If the callback is called, then we know
    that the message loop is being pumped. If not, then we probably are not
    going to get async callbacks from the WinRT APIs and we raise an
    exception in this case.
    dlech committed May 23, 2024
    Configuration menu
    Copy the full SHA
    69b8c69 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. Configuration menu
    Copy the full SHA
    45cab2d View commit details
    Browse the repository at this point in the history
  2. add some tests

    dlech committed May 24, 2024
    Configuration menu
    Copy the full SHA
    59a4fbb View commit details
    Browse the repository at this point in the history
  3. fix uninitialize_sta

    dlech committed May 24, 2024
    Configuration menu
    Copy the full SHA
    26a7893 View commit details
    Browse the repository at this point in the history
  4. fix doc builds

    dlech committed May 24, 2024
    Configuration menu
    Copy the full SHA
    ef0723f View commit details
    Browse the repository at this point in the history
  5. update docs

    dlech committed May 24, 2024
    Configuration menu
    Copy the full SHA
    2b48574 View commit details
    Browse the repository at this point in the history
  6. check for pythoncom

    dlech committed May 24, 2024
    Configuration menu
    Copy the full SHA
    2b6c49f View commit details
    Browse the repository at this point in the history
  7. fix setting wrong attribute

    dlech committed May 24, 2024
    Configuration menu
    Copy the full SHA
    d3685a2 View commit details
    Browse the repository at this point in the history
  8. reduce timeout

    dlech committed May 24, 2024
    Configuration menu
    Copy the full SHA
    c987aaa View commit details
    Browse the repository at this point in the history
  9. fix more wrong attribute

    dlech committed May 24, 2024
    Configuration menu
    Copy the full SHA
    1f88e87 View commit details
    Browse the repository at this point in the history
  10. fix tests

    dlech committed May 24, 2024
    Configuration menu
    Copy the full SHA
    c9eeb0c View commit details
    Browse the repository at this point in the history