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

[FIX] Ensure qasync loop is set as running #281

Merged
merged 2 commits into from Oct 13, 2023

Conversation

ales-erjavec
Copy link
Collaborator

Issue

Requesting help for a widget when using the latest released qasync v0.24.2 fails with an exception

Traceback (most recent call last):
  File "/Users/aleserjavec/workspace/orange-canvas/orangecanvas/application/canvasmain.py", line 2352, in run
    url = await query_coro
          ^^^^^^^^^^^^^^^^
  File "/Users/aleserjavec/workspace/orange-canvas/orangecanvas/help/manager.py", line 127, in search_async
    return await provider.search_async(desc, timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aleserjavec/workspace/orange-canvas/orangecanvas/help/provider.py", line 133, in search_async
    await asyncio.wait_for(reply_f, timeout)
  File "/Users/aleserjavec/.local/opt/python3.11/Python.framework/Versions/3.11/lib/python3.11/asyncio/tasks.py", line 439, in wait_for
    loop = events.get_running_loop()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: no running event loop

Changes

  • Ensure qasync loop is set as the running loop.
  • Some minor cleanup.

Since qasync>=0.24.2 the loop no longer sets the loop as running
Since qasync>=0.10.0 it correctly handles case insensitive QT_API env
variables.
@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (02c70d2) 75.48% compared to head (622fb4e) 75.48%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #281   +/-   ##
=======================================
  Coverage   75.48%   75.48%           
=======================================
  Files          99       99           
  Lines       21031    21032    +1     
=======================================
+ Hits        15875    15876    +1     
  Misses       5156     5156           
Files Coverage Δ
orangecanvas/utils/asyncutils.py 86.66% <100.00%> (+6.02%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PrimozGodec PrimozGodec merged commit 49a5f33 into biolab:master Oct 13, 2023
23 of 24 checks passed
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.

None yet

3 participants