Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async methods with @method #130

Open
thusser opened this issue Aug 15, 2022 · 1 comment
Open

Async methods with @method #130

thusser opened this issue Aug 15, 2022 · 1 comment

Comments

@thusser
Copy link

thusser commented Aug 15, 2022

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?

@jonasBoss
Copy link

It is already possible using the aio MessageBus. If you are curious why:

if not asyncio.iscoroutinefunction(method.fn):

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

No branches or pull requests

2 participants