python-trio / trio-amqp

Asynchronous messaging for snake people
BSD 3-Clause "New" or "Revised" License
10 stars 7 forks source link

SyntaxError: 'yield' inside async function #2

Closed maynewong closed 6 years ago

maynewong commented 6 years ago
Traceback (most recent call last):
  File "worker.py", line 2, in <module>
    import trio_amqp
  File "/usr/lib/python3.5/site-packages/trio_amqp/__init__.py", line 45
    yield amqp
           ^
njsmith commented 6 years ago

Using python 3.6 will fix that.

I'm not the trio-ampq maintainer, so I don't know if it's supposed to work on python 3.5 or not. But that's 3.6 syntax.

maynewong commented 6 years ago

@njsmith Thank you, it can run in python 3.6

smurfix commented 6 years ago

It's possible to do async iterators in 3.5, but the compatibility workaround is very annoying when you need to debug anything, so I didn't put it in yet. I'll fix that shortly.

smurfix commented 6 years ago

done by now, so closing.