diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-03 04:39:20 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-03 04:43:49 +0000 |
commit | 44c3b776917444ca98667f5d6f4470c767f820bf (patch) | |
tree | a8ab013462997a9a79d40e0714ed75790deb0af4 | |
parent | ce9be69615c700a0472098c5db171d33091c0b5a (diff) | |
download | psycopg2-44c3b776917444ca98667f5d6f4470c767f820bf.tar.gz |
Added docs for async_ alias
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | doc/src/connection.rst | 4 | ||||
-rw-r--r-- | doc/src/extensions.rst | 2 | ||||
-rw-r--r-- | doc/src/module.rst | 6 |
4 files changed, 13 insertions, 1 deletions
@@ -29,6 +29,8 @@ New features: unicode encoding/decoding (:ticket:`#473`). - Fixed error caused by missing decoding `~psycopg2.extras.LoggingConnection` (:ticket:`#483`). +- Added ``async_`` as an alias for ``async`` to support Python 3.7 where + ``async`` will become a keyword (:ticket:`#495`). Other changes: diff --git a/doc/src/connection.rst b/doc/src/connection.rst index c99c8bd..0bc584c 100644 --- a/doc/src/connection.rst +++ b/doc/src/connection.rst @@ -706,9 +706,13 @@ The ``connection`` class .. attribute:: async + async_ Read only attribute: 1 if the connection is asynchronous, 0 otherwise. + .. versionchanged:: 2.7 added the `!async_` alias for Python versions + where `!async` is a keyword. + .. method:: poll() diff --git a/doc/src/extensions.rst b/doc/src/extensions.rst index 9c5a853..8d70ba3 100644 --- a/doc/src/extensions.rst +++ b/doc/src/extensions.rst @@ -29,6 +29,8 @@ introspection etc. For a complete description of the class, see `connection`. + .. versionchanged:: 2.7 + *async_* can be used as alias for *async*. .. class:: cursor(conn, name=None) diff --git a/doc/src/module.rst b/doc/src/module.rst index 97fbdf1..2bd259e 100644 --- a/doc/src/module.rst +++ b/doc/src/module.rst @@ -64,7 +64,8 @@ The module interface respects the standard defined in the |DBAPI|_. cursors you can use this parameter instead of subclassing a connection. Using *async*\=\ `!True` an asynchronous connection will be created: see - :ref:`async-support` to know about advantages and limitations. + :ref:`async-support` to know about advantages and limitations. *async_* is + a valid alias for the Python version where ``async`` is a keyword. .. versionchanged:: 2.4.3 any keyword argument is passed to the connection. Previously only the @@ -76,6 +77,9 @@ The module interface respects the standard defined in the |DBAPI|_. .. versionchanged:: 2.7 both *dsn* and keyword arguments can be specified. + .. versionchanged:: 2.7 + added *async_* alias. + .. seealso:: - `~psycopg2.extensions.parse_dsn` |