classification
Title: Missing mention of DatagramProtocol having connection_made and connection_lost methods
Type: enhancement Stage:
Components: asyncio, Documentation Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: ariddell, docs@python, gvanrossum, python-dev, vstinner, yselivanov
Priority: normal Keywords:

Created on 2014-06-10 00:19 by ariddell, last changed 2014-06-10 07:23 by vstinner. This issue is now closed.

Messages (3)
msg220130 - (view) Author: Allen Riddell (ariddell) Date: 2014-06-10 00:19
The following important information from PEP 3156 does not appear in the asyncio library documentation:

"""Datagram protocols have connection_made() and connection_lost() methods with the same signatures as stream protocols."""

Indeed, reading the docs it looks like only ``Protocol`` and ``SubprocessProtocol`` have these methods. (See https://docs.python.org/3.4/library/asyncio-protocol.html#connection-callbacks)

The quick fix is to change the lines 275-276 in ``Doc/library/asyncio-protocol.rst`` from:

    These callbacks may be called on Protocol and SubprocessProtocol instances:

to

    These callbacks may be called on Protocol, DatagramProtocol, and SubprocessProtocol instances:
msg220145 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-06-10 07:21
New changeset 79562a31e5a6 by Victor Stinner in branch '3.4':
Issue #21700: Fix asyncio doc, add DatagramProtocol
http://hg.python.org/cpython/rev/79562a31e5a6

New changeset a8dfdae4c4a0 by Victor Stinner in branch 'default':
(Merge 3.4) Issue #21700: Fix asyncio doc, add DatagramProtocol
http://hg.python.org/cpython/rev/a8dfdae4c4a0
msg220146 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-06-10 07:23
Fixed. Thanks for the report.
History
Date User Action Args
2014-06-10 07:23:49vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg220146
2014-06-10 07:21:18python-devsetnosy: + python-dev
messages: + msg220145
2014-06-10 00:19:34ariddellcreate