Details
Description
In the example below, the runtime error that occurs inside the task group body causes the application to never finish and it must be killed.
When using asyncio.run instead of Qtasyncio.run, the error is raised and wrapped in an exception group as expected.
import asyncio import sys from PySide6 import QtAsyncio from PySide6.QtWidgets import QApplication async def job(): await asyncio.sleep(1) async def main() -> None: async with asyncio.TaskGroup() as tg: tg.create_task(job()) raise RuntimeError("error") if __name__ == "__main__": app = QApplication(sys.argv) QtAsyncio.run(main(), keep_running=False)