Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.7 compatibility #436

Closed
smagafurov opened this issue Feb 13, 2018 · 9 comments
Closed

Python 3.7 compatibility #436

smagafurov opened this issue Feb 13, 2018 · 9 comments

Comments

@smagafurov
Copy link
Contributor

SyntaxError in python 3.7 (name async is not allowed)

  File "/home/travis/build/05bit/peewee-async/peewee_async.py", line 29, in <module>
    import aiopg
  File "/home/travis/virtualenv/python3.7-dev/lib/python3.7/site-packages/aiopg/__init__.py", line 5, in <module>
    from .connection import connect, Connection, TIMEOUT as DEFAULT_TIMEOUT
  File "/home/travis/virtualenv/python3.7-dev/lib/python3.7/site-packages/aiopg/connection.py", line 109
    self._conn = psycopg2.connect(dsn, async=True, **kwargs)
                                           ^
SyntaxError: invalid syntax
@asvetlov
Copy link
Member

Should be easy to fix: just add kwargs['async'] = True.

Would you create a Pull Request?

@smagafurov
Copy link
Contributor Author

#437

@Pajinek
Copy link

Pajinek commented Jul 9, 2018

Any progress?

@Gr1N
Copy link
Contributor

Gr1N commented Jul 10, 2018

+1

@and-semakin
Copy link
Contributor

psycopg2 guys have already fixed this issue. Now the argument should be async_, not async. See: psycopg/psycopg2#714 (comment)

@JustinTArthur
Copy link

@Brokeru this has been addressed in PR #437 already. Just awaiting approval.

vir-mir pushed a commit that referenced this issue Aug 13, 2018
* python3.7 support

* do not test with python nightly

* add python nightly (now 3.7-dev) testing

* add forgotten @asyncio.coroutine decorator

* tambourine dances trying to prevent lower tests coverage

* python3.7: __aiter__ MUST return object that implement __anext__

* use psycopg2.connect `async_` kwarg

* Await result before first async iteration in 3.5.2+ in SQL alchemy execute.

Supplements pull request #437 for #436.

* Fix for RuntimeError in Python 3.7+ from unexpected StopIteration raise.

The behavior of iteration has changed to where a StopIteration exception
should not be raised inside a generator except by something unexpected.

* Allow QA of StopAsyncIteration lines, give flake8 built-in hint in <3.5

Resolves Python 3.4 flake8 continuous integration failure.

* bare StopAsyncIteration breaks code coverage in python 3.4

* Revert "bare StopAsyncIteration breaks code coverage in python 3.4"

This reverts commit 8d82522.

* Add proper job for 3.7

* Add 3.7 job w/o debug
@vir-mir
Copy link
Member

vir-mir commented Aug 13, 2018

in master. @asvetlov release new version please

@asvetlov
Copy link
Member

Nice!
Thank you @vir-mir

@asvetlov
Copy link
Member

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants