bamthomas / aioimaplib

Python asyncio IMAP4rev1 client library
GNU General Public License v3.0
135 stars 58 forks source link

Syntax error on Python 3.7 #42

Closed fenhl closed 6 years ago

fenhl commented 6 years ago

Importing aioimaplib fails on Python 3.7 because async is a keyword now.

>>> import aioimaplib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/aioimaplib/__init__.py", line 18, in <module>
    from .aioimaplib import *
  File "/usr/local/lib/python3.7/site-packages/aioimaplib/aioimaplib.py", line 51
    'CAPABILITY':   Cmd('CAPABILITY',   (NONAUTH, AUTH, SELECTED),  Exec.async),
                                                                             ^
SyntaxError: invalid syntax
fenhl commented 6 years ago

Thanks for fixing! What's the ETA for this on PyPI?

fenhl commented 6 years ago

I tried using master and this is still not fixed since the code uses asyncio.async instead of asyncio.ensure_future.

amelchio commented 5 years ago

@bamthomas Can you cut a new PyPI release with Python 3.7 compatibility?

bamthomas commented 5 years ago

yes I'll do it this week end, sorry for the delay.

amelchio commented 5 years ago

I am sorry to bug you but we would really appreciate a new release. Home Assistant is soon moving to Python 3.7 with the release planned for Wednesday this week.

bamthomas commented 5 years ago

release 0.7.15 is done.

But note that the 3.7 python is not tested in CI as the tests with xenial is failing (cf a21e3f8 ) and I don't have the time before your Home Assistant release to understand why.

amelchio commented 5 years ago

Thanks a lot. I will be back with PRs if it does not work :)