Added docs for async_ alias

This commit is contained in:
Daniele Varrazzo 2017-02-03 04:39:20 +00:00
parent ce9be69615
commit 44c3b77691
4 changed files with 13 additions and 1 deletions

2
NEWS
View File

@ -29,6 +29,8 @@ New features:
unicode encoding/decoding (:ticket:`#473`). unicode encoding/decoding (:ticket:`#473`).
- Fixed error caused by missing decoding `~psycopg2.extras.LoggingConnection` - Fixed error caused by missing decoding `~psycopg2.extras.LoggingConnection`
(:ticket:`#483`). (:ticket:`#483`).
- Added ``async_`` as an alias for ``async`` to support Python 3.7 where
``async`` will become a keyword (:ticket:`#495`).
Other changes: Other changes:

View File

@ -706,9 +706,13 @@ The ``connection`` class
.. attribute:: async .. attribute:: async
async_
Read only attribute: 1 if the connection is asynchronous, 0 otherwise. 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() .. method:: poll()

View File

@ -29,6 +29,8 @@ introspection etc.
For a complete description of the class, see `connection`. 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) .. class:: cursor(conn, name=None)

View File

@ -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. cursors you can use this parameter instead of subclassing a connection.
Using *async*\=\ `!True` an asynchronous connection will be created: see 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 .. versionchanged:: 2.4.3
any keyword argument is passed to the connection. Previously only the 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 .. versionchanged:: 2.7
both *dsn* and keyword arguments can be specified. both *dsn* and keyword arguments can be specified.
.. versionchanged:: 2.7
added *async_* alias.
.. seealso:: .. seealso::
- `~psycopg2.extensions.parse_dsn` - `~psycopg2.extensions.parse_dsn`