gchiam/ynab-client-python

Does not work with Python 3.7

Opened this issue · 2 comments

Library does not import on Python 3.7. Simple reproduction:

$ python --version
Python 3.7.4

$ python -c "import ynab_client"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/ralmeida/.pyenv/versions/3.7.4/lib/python3.7/site-packages/ynab_client/__init__.py", line 19, in <module>
    from ynab_client.api.accounts_api import AccountsApi
  File "/Users/ralmeida/.pyenv/versions/3.7.4/lib/python3.7/site-packages/ynab_client/api/__init__.py", line 6, in <module>
    from ynab_client.api.accounts_api import AccountsApi
  File "/Users/ralmeida/.pyenv/versions/3.7.4/lib/python3.7/site-packages/ynab_client/api/accounts_api.py", line 133
    async=params.get('async'),
        ^
SyntaxError: invalid syntax

I tested with 3.7.4, but any 3.7+ version should give the same problem, since async is now a reserved Python keyword. In 3.6.9 it works fine (as it should with other previous versions as well).

Maybe it's a swagger-codegen problem?

Pezmc commented

This is fixed in #12 but you need to ensure you have the latest copy of this repo. #14 cuts a new release number so you can ensure you get the 3.7 compatible version in future.