Skip to content

Cython used with async - Decorators can only be followed by functions or classes #1462

@JendaPlhak

Description

@JendaPlhak

I'm trying to compile Python 3 code using Cython (version 0.25a0). The code heavily depends on asyncio and works normally when run with latest Python. Compilation however gives me following error:

Error compiling Cython file:
------------------------------------------------------------
...

    @helpers.json_handler(logger = logger)
    async def get_index(req, req_body):
   ^
------------------------------------------------------------

skystore/mem_node.py:40:4: Decorators can only be followed by functions or classes

Does it mean, that async and await keywords are not supported? I thought otherwise because according to changelog it was implemented last year.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions