Skip to content

`async_to_sync' is not wrapped properly: #500

Open
@NiKuma0

Description

@NiKuma0

For now, I'm using this approach, which should be in the asgiref:

import functools
...

from asgiref.sync import async_to_sync as _async_to_sync
...

def async_to_sync(awaitable: Callable[P, Coroutine[Any, Any, T]]) -> Callable[P, T]:
    return functools.wraps(awaitable)(_async_to_sync(awaitable))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions