This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: asyncio: patches to document EventLoop and add more examples
Type: Stage:
Components: Documentation Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, gvanrossum, pitrou, python-dev, terry.reedy, vstinner
Priority: normal Keywords: patch

Created on 2013-11-29 15:16 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
asyncio_doc_eventloop.patch vstinner, 2013-11-29 15:16
asyncio_doc_examples.patch vstinner, 2013-11-29 15:17
asyncio_doc_methods.patch vstinner, 2013-11-29 15:58 review
Messages (8)
msg204724 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-11-29 15:16
Attached patches document get_event_loop() and BaseEventLoop; and add two "hello world" examples copied from:
http://code.google.com/p/tulip/source/browse/#hg%2Fexamples
msg204725 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-11-29 15:17
I know that the documentation contains a lot of XXX, but it documents at least the prototype of the methods. I may provide more patches fixing XXX later ;-)

I hesitated to document the Handle class, but it looks like Guido prefers to not document it?
msg204727 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-11-29 15:22
Since there are many event loop methods, I structured the doc so that methods are grouped in different sections: see the existing "delayed calls" and "creating connections" sections.

I'm not saying it's the best solution (is it?), but I think it would be nice to be consistent :)
msg204734 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-11-29 15:58
> Since there are many event loop methods, I structured the doc so that methods are grouped in different sections: see the existing "delayed calls" and "creating connections" sections.

Seriously, I read the documentation three times (HTML and the source), but I didn't notice that asyncio.call_later() is not a function, but a method of an object.

> I'm not saying it's the best solution (is it?), but I think it would be nice to be consistent :)

There are too many methods, it's a good solution. I will rewrite asyncio_doc_eventloop.patch to group the methods.

Before that, here is a patch to mention the class for methods.
msg204743 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2013-11-29 17:24
I would much rather review the docs after they've been committed.
msg204763 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-11-30 00:52
One reason I originally didn't add the class names to the methods is that I don't know if we want to document the inheritance hierarchy. Guido, what do you think?
msg205003 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-12-02 11:42
New changeset 7b4d046dbf56 by Victor Stinner in branch 'default':
Issue #19833: asyncio doc: add class name to methods
http://hg.python.org/cpython/rev/7b4d046dbf56

New changeset b25458022965 by Victor Stinner in branch 'default':
Issue #19833: add 2 examples to asyncio doc (hello world)
http://hg.python.org/cpython/rev/b25458022965

New changeset 5e4ea92f9a9b by Victor Stinner in branch 'default':
Issue #19833: Document more asyncio.BaseEventLoop methods
http://hg.python.org/cpython/rev/5e4ea92f9a9b
msg205030 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-12-02 16:59
I documented many new classes. I read the source code and copied classes to extract docstrings.

Instead of BaseXXX classes, it's maybe better to document AbstractXXX classes.
History
Date User Action Args
2022-04-11 14:57:54adminsetgithub: 64032
2013-12-03 17:46:18vstinnersetstatus: open -> closed
resolution: fixed
2013-12-02 16:59:26vstinnersetmessages: + msg205030
2013-12-02 11:42:12python-devsetnosy: + python-dev
messages: + msg205003
2013-11-30 04:16:35terry.reedysetnosy: + terry.reedy
2013-11-30 00:52:21pitrousetmessages: + msg204763
2013-11-29 17:24:41gvanrossumsetmessages: + msg204743
2013-11-29 15:58:59vstinnersetfiles: + asyncio_doc_methods.patch

messages: + msg204734
2013-11-29 15:22:09pitrousetmessages: + msg204727
2013-11-29 15:17:31vstinnersetfiles: + asyncio_doc_examples.patch

messages: + msg204725
2013-11-29 15:16:16vstinnercreate