aio-libs / janus

Thread-safe asyncio-aware queue for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Syntax error with Python 3.7

martino87r opened this issue · comments

Hi there, while testing with the newly released Python 3.7 importing Janus produces the following exception:

  File "/home/martino/github/pystm/pystm/log/execution.py", line 2, in <module>
    import janus
  File "/home/martino/github/pystm/venv2/lib/python3.7/site-packages/janus/__init__.py", line 19
    ensure_future = asyncio.async
                                ^
SyntaxError: invalid syntax

Python 3.7 made async a reserved keyword, thus it cannot be used

Good catch, would you like to submit PR with fix?