Skip to content

Conversation

alimirjamali
Copy link
Contributor

Python 3.14 (in Fedora 43) throws RunetimeError if event loop is not initialized before using it.

Resolves: QubesOS/qubes-issues#10188

@codecov
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.54%. Comparing base (5140b97) to head (7e4a837).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
qubes/tools/qubesd.py 0.00% 2 Missing ⚠️
qubes/tools/qubesd_query.py 0.00% 2 Missing ⚠️
qubes/tools/qubes_create.py 0.00% 1 Missing ⚠️
qubes/vm/__init__.py 0.00% 1 Missing ⚠️
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     
Flag Coverage Δ
unittests 70.54% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

self._qdb_connection_watch = qubesdb.QubesDB(self.name)
if loop is None:
loop = asyncio.get_event_loop()
loop = asyncio.new_event_loop()
Copy link
Member

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.

Copy link
Contributor Author

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
@reneleonhardt
Copy link

Nice contribution! What's still needed for Python 3.14?

@alimirjamali
Copy link
Contributor Author

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.

@reneleonhardt
Copy link

Thank you!
So is there something missing to undraft and review this? 🙂

@alimirjamali
Copy link
Contributor Author

Thank you! So is there something missing to undraft and review this? 🙂

Actually this is also ready for review. The only issue is lack of time. More information here.

@marmarek
Copy link
Member

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).

@alimirjamali alimirjamali marked this pull request as ready for review September 20, 2025 12:58
@reneleonhardt
Copy link

What does may be useful mean?
It may not be needed for R4.3 but it modernizes docs, tools, tests and vm while still working on 3.13 (Fedora 41 and 42) and allowing CI to prepare in time for the next Fedora ❤️

@marmarek
Copy link
Member

Yes, but at this time "main" branch is open only for changes that are necessary for R4.3.

@reneleonhardt
Copy link

I couldn't find this information in the README, only the master branch is being mentioned there.
Maybe you want to make the documentation clearer or introduce a v4.4 integration branch for future features.

@marmarek
Copy link
Member

marmarek commented Sep 20, 2025

See https://doc.qubes-os.org/en/latest/developer/releases/version-scheme.html#release-schedule
Anyway, this is not the place for such discussion.

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.

asyncio.get_event_loop() throws RuntimeError on Fedora 43 / Python 3.14 if event loop is not initialized

3 participants