python-dbus-next icon indicating copy to clipboard operation
python-dbus-next copied to clipboard

Async methods with @method

Open thusser opened this issue 3 years ago • 1 comments

Am I missing something or is it not possible to decorate async methods with @method? The wrapped method here is not marked async: https://github.com/altdesktop/python-dbus-next/blob/master/dbus_next/service.py#L90 Should be easy to check, whether fn is a coroutine or not and then either provide an async or normal version of wrapped. Want a PR?

thusser avatar Aug 15 '22 10:08 thusser

It is already possible using the aio MessageBus. If you are curious why: https://github.com/altdesktop/python-dbus-next/blob/ab566e16a71bfc9d7e0d29676aa459ec060e72c5/dbus_next/aio/message_bus.py#L345

jonasBoss avatar Dec 18 '22 11:12 jonasBoss