qasync
qasync copied to clipboard
Python library for using asyncio in Qt-based applications.
The [aiohttp_fetch.py](https://github.com/CabbageDevelopment/qasync/blob/master/examples/aiohttp_fetch.py) example file makes use of the `@asyncSlot()` decorator to allow passing the `on_btnFetch_clicked` async function to the `.connect` method of a button. Under the covers, `@asyncSlot()` is just...
I am testing with python 3.12.3 and PySide6 6.7.0. When using qasync >= 0.24.2, the attached script fails on the call to `asyncio.create_task` with this exception: ``` Traceback (most recent...
Python version is 3.11.8-1. Arch Linux, Plasma 6.0.4, kernel 6.8.7. pyside6 6.7.0-3 and python-qasync 0.24.0-2 are installed from the official repository. If I run the "basic example" as it is,...
There is a little bug with the "maintained" badge. It currently shows that the project is not maintained (which was a little confusing as the README later states that the...
Repro: ``` import asyncio import logging from PyQt5 import QtWidgets import qasync logging.basicConfig(level=logging.DEBUG) app = QtWidgets.QApplication(["test"]) loop = qasync.QEventLoop(app) asyncio.set_event_loop(loop) loop.set_debug(True) loop.run_until_complete(asyncio.open_connection("127.0.0.1", 3251)) # with the port not open ```...
In e65c342 the qasync example usage in the README has been updated, along with `aiohttp_fetch.py`. Before, it used `qasync.run()` ```python async def main(): app = qasync.QApplication.instance() app_close_event = asyncio.Event() app.aboutToQuit.connect(app_close_event.set)...
The code below where I'm creating an async task "counter" from the MainUI class init function was working fine with version 0.24.0 but is not working anymore from 0.24.2. The...
When investigating the source code of qasync/asyncio while working on #113, I found out about the following difference in behaviour when the loop closes. `asyncio.BaseEventLoop.close` does not wait for its...
When writing tests, I've noticed that when using `qasync.QThreadExecutor`, the objects, be it instance method owners, or something passed in as args, were not deleted immediately as the executor finished...
This PR resolves an issue encountered in #100 by adding functionality for logging slow `handle._run` invocations the same way it's done by `asyncio.BaseEventLoop(events.AbstractEventLoop)`. It the modifies `_SimpleTimer.timerEvent` function by adding...