altdesktop / python-dbus-next

🚌 The next great DBus library for Python with asyncio support
https://python-dbus-next.readthedocs.io/en/latest/
MIT License
187 stars 59 forks source link

glib async methods return list for single result #109

Open mpnordland opened 2 years ago

mpnordland commented 2 years ago

fixes #108 The async method calls on the glib.ProxyInterface class lacked the ability to unpack a single result while the sync version did do that. This commit moves unpacking code to the async version so both will behave correctly.

mpnordland commented 2 years ago

While I feel the current test suite is sufficient to show there are not regressions from this change, I think it would be helpful to add tests that specifically check the asynchronous calls so that changes aren't made to just the synchronous calls that should apply to both. I attempted to write such tests, but I ran into a segfault with GLib that I am too tired/ignorant to know how to solve.