Notifications are received as instances of `Notify`. If you are reserving a
connection only to receive notifications, the simplest way is to consume the
`Connection.notifies` generator. The generator can be stopped using
-`!close()`.
+`!close()`. Starting from Psycopg 3.2, the method supports options to receive
+notifications only for a certain time or up to a certain number.
.. note::
any sessions in the database generates a :sql:`NOTIFY` on one of the
listened channels.
+ .. versionchanged:: 3.2
+
+ Added `!timeout` and `!stop_after` parameters.
+
.. automethod:: add_notify_handler
See :ref:`async-notify` for details.
...
.. automethod:: notifies
+
+ .. versionchanged:: 3.2
+
+ Added `!timeout` and `!stop_after` parameters.
+
.. automethod:: set_autocommit
.. automethod:: set_isolation_level
.. automethod:: set_read_only
- Add support for integer, floating point, boolean `NumPy scalar types`__
(:ticket:`#332`).
+- Add `!timeout` and `!stop_after` parameters to `Connection.notifies()`
+ (:ticket:`340`).
- Add :ref:`raw-query-cursors` to execute queries using placeholders in
PostgreSQL format (`$1`, `$2`...) (:ticket:`#560`).
- Add `~Connection.set_autocommit()` on sync connections, and similar