-
-
Notifications
You must be signed in to change notification settings - Fork 116
Initialize asyncio event loop before using it #723
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #723 +/- ##
==========================================
- Coverage 70.55% 70.54% -0.02%
==========================================
Files 61 61
Lines 13616 13644 +28
==========================================
+ Hits 9607 9625 +18
- Misses 4009 4019 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
qubes/vm/__init__.py
Outdated
self._qdb_connection_watch = qubesdb.QubesDB(self.name) | ||
if loop is None: | ||
loop = asyncio.get_event_loop() | ||
loop = asyncio.new_event_loop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During normal execution, at this point the loop surely is running already, so this change should not be necessary (or maybe it can be changed to get_running_loop()?).
What I'm not sure is there is a loop running in tests reaching this function, but this should be easy to find, and create the loop in those cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I changed this one toget_running_loop
.
Python 3.14 (in Fedora 43) throws RunetimeError if event loop is not initialized before using it. Resolves: QubesOS/qubes-issues#10188
cd49dc6
to
7e4a837
Compare
Nice contribution! What's still needed for Python 3.14? |
I am not certain. Some of the pending issues are tracked on the main Fedora 43 issue. Like this one. |
Thank you! |
Actually this is also ready for review. The only issue is lack of time. More information here. |
This PR is for dom0, and there are no plans to change Python version in R4.3 dom0 (it will stay at 3.13). This PR may be useful only for the future (R4.4 and beyond). |
What does may be useful mean? |
Yes, but at this time "main" branch is open only for changes that are necessary for R4.3. |
I couldn't find this information in the README, only the |
See https://doc.qubes-os.org/en/latest/developer/releases/version-scheme.html#release-schedule |
Python 3.14 (in Fedora 43) throws RunetimeError if event loop is not initialized before using it.
Resolves: QubesOS/qubes-issues#10188