classification
Title: asyncio.SubprocessProtocol is missing
Type: behavior Stage: needs patch
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vstinner Nosy List: akira, gvanrossum, python-dev, vstinner
Priority: normal Keywords:

Created on 2013-12-20 06:37 by akira, last changed 2014-02-06 21:57 by vstinner. This issue is now closed.

Messages (6)
msg206665 - (view) Author: Akira Li (akira) * Date: 2013-12-20 06:37
`SubprocessProtocol` is documented  to be accessible as `asyncio.SubprocessProtocol` [1] but it is not included in `asyncio.protocols.__all__` [2] that leads to `AttributeError`:

    python3.4 -c "import asyncio; asyncio.SubprocessProtocol"
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    AttributeError: 'module' object has no attribute 'SubprocessProtocol'

The following works as expected:

    python3.4 -c "import asyncio; asyncio.protocols.SubprocessProtocol"

No error.

[1]: http://docs.python.org/3.4/library/asyncio-protocol.html#asyncio.SubprocessProtocol

[2]: http://hg.python.org/cpython/file/13a505260f17/Lib/asyncio/protocols.py#l3
msg206704 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-12-20 22:13
I propose that we fix the code.  There are also some documented Transport classes that aren't listed in __all__.

I'll submit the fix.
msg206706 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-12-20 22:17
New changeset 0a135e790ce5 by Guido van Rossum in branch 'default':
asyncio: Export all abstract protocol and transport classes. Fixes issue #20029.
http://hg.python.org/cpython/rev/0a135e790ce5
msg206710 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-12-20 22:24
There's one issue left: the docs need to document BaseProtocol.
msg210392 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-02-06 14:50
> There's one issue left: the docs need to document BaseProtocol.

The BaseProtocol is documented here:
http://docs.python.org/dev/library/asyncio-protocol.html#protocols

Can we close the issue?
msg210406 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2014-02-06 16:25
Go ahead and close it.
History
Date User Action Args
2014-02-06 21:57:14vstinnersetstatus: open -> closed
resolution: fixed
2014-02-06 16:25:31gvanrossumsetmessages: + msg210406
2014-02-06 14:50:09vstinnersetmessages: + msg210392
2013-12-20 22:24:48gvanrossumsetassignee: vstinner
messages: + msg206710
stage: needs patch
2013-12-20 22:17:35python-devsetnosy: + python-dev
messages: + msg206706
2013-12-20 22:13:33gvanrossumsetmessages: + msg206704
2013-12-20 21:38:04pitrousetnosy: + gvanrossum, vstinner
2013-12-20 06:37:34akiracreate