-
-
Notifications
You must be signed in to change notification settings - Fork 504
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 support: async is a keyword #714
Comments
It is already fixed: since psycopg 2.7 you can use |
Running on Travis CI to see what happens BTW: https://travis-ci.org/hroncok/psycopg2/jobs/380610023 |
Would you accept a PR that fixes the tests and enables 3.7 on Travis? |
Funny enough the tests pass as they are. |
|
Of course I'm happy to accept running the tests on 3.7 too, thank you :) |
Weird the tests pass as they are. I would have expected |
As of 2.7 the tests were passing on python 3.7. The cursor test was broken in psycopg 2.7.2 by b203a7c |
this is in master but not in maint_2_7. Will cherry-pick. |
test_cursor fixed too. However 3.7 tests cannot run automatically on the branch maint_2_7 because it still supports Python 3.2, which instead is no more supported by recent pip versions (see this failure). That's no big deal: I'd start push psycopg 2.8 instead. |
@dvarrazzo Debian migrated to python 3.7 in unstable. Do you have an ETA for 2.8? :) Cheers! |
No, no release date yet, working on a couple of experimental branches. However psycopg 2.7.5 runs perfectly well on python 3.7: try
|
At the moment, installing |
See https://src.fedoraproject.org/rpms/python-psycopg2/c/89f4b65570783ea763c37311e974296d3ff40d90?branch=master for how we dealt with it within Fedora. |
Thanks @hroncok for the pointer; I've done mostly the same thing when uploading an updated psycopg2 that fixes the install issue in Debian. FWIW, @dvarrazzo, the concrete issue here is that when installing Python modules, Debian will byte-compile all files for all supported versions, even if they're never imported. The test_async_keyword.py file can't be byte-compiled by 3.7 (because it uses async as a variable), so the install blows up. The "fix" is to stop shipping the file in the binary packages. Thanks for maintaining psycopg2, and sorry for the noise :) |
Thanks a lot. We have similar case where in our exist pipeline where we will manually compile all files with |
According to PEP 492,
async
andawait
are now keywords and cannot be used as names.psycopg2 does:
Can this be renamed, to
asynch
maybe orasync_
?The text was updated successfully, but these errors were encountered: