bpo-33736: Improve the documentation of asyncio stream APIs#7326
Merged
Conversation
Improve the documentation of `asyncio.open_connection()`, `asyncio.start_server()` and their UNIX socket counterparts.
willingc
approved these changes
Jun 3, 2018
| @@ -0,0 +1,2 @@ | |||
| Improve the documentation of func:`asyncio.open_connection`, | |||
Contributor
There was a problem hiding this comment.
Looks like there is a missing : before func.
| :meth:`~AbstractEventLoop.create_server()` except *protocol_factory*; most | ||
| common are positional *host* and *port*, with various optional keyword | ||
| arguments following. | ||
| When specified, the *loop* argument determines which event loop to use, |
Contributor
There was a problem hiding this comment.
On line 47, consider adding:
The callback for a connected client, *client_connected_cb*, contains a *client_reader* and *client_writer*. ... The *client_connected_cb* parameter may be a plain callback function or a :ref:`coroutine function <coroutine>`. If the parameter is a coroutine function, it will be automatically converted into a :class:`Task`.
Contributor
Author
There was a problem hiding this comment.
I reworded the whole paragraph for clarity.
|
|
||
| See :func:`start_server` for information about return value and other | ||
| details. | ||
| The *client_connected_cb* parameter is called with two parameters: |
Contributor
There was a problem hiding this comment.
Perhaps add a few words for better reader understanding:
The callback for a connected client, *client_connected_cb*, contains a *client_reader* and *client_writer*.
Member
Contributor
1st1
approved these changes
Jun 8, 2018
Member
|
Thanks for the review @willingc! |
Contributor
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jun 8, 2018
|
GH-7539 is a backport of this pull request to the 3.7 branch. |
miss-islington
added a commit
that referenced
this pull request
Jun 8, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve the documentation of
asyncio.open_connection(),asyncio.start_server()and their UNIX socket counterparts.https://bugs.python.org/issue33736