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

Deprecate connect()'s async keyword as it'll become a keyword in Python 3.7 #495

Closed
timgraham opened this Issue Dec 16, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@timgraham
Copy link
Contributor

timgraham commented Dec 16, 2016

psycopg2.connect() takes a async keyword but this will be prohibited in Python 3.7.

psycopg2/__init__.py:164: DeprecationWarning: 'async' and 'await' will become
reserved keywords in Python 3.7

Idea: rename async=False to async_=False (or whatever) and pop 'async' from kwargs and raise a warning about it.

@dvarrazzo

This comment has been minimized.

Copy link
Member

dvarrazzo commented Dec 16, 2016

So fun :(

@dvarrazzo dvarrazzo added this to the psycopg 2.7 milestone Jan 5, 2017

@dvarrazzo dvarrazzo closed this in 1911b25 Feb 3, 2017

@dvarrazzo

This comment has been minimized.

Copy link
Member

dvarrazzo commented Feb 3, 2017

Added async_ as an alias to the psycopg2.connect() function, connection.__init__(), and the connection.async attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment