Skip to content

bpo-34666: Implement stream.awrite() and stream.aclose()#9274

Merged
asvetlov merged 5 commits into
python:masterfrom
asvetlov:improve-streams
Sep 13, 2018
Merged

bpo-34666: Implement stream.awrite() and stream.aclose()#9274
asvetlov merged 5 commits into
python:masterfrom
asvetlov:improve-streams

Conversation

@asvetlov

@asvetlov asvetlov commented Sep 13, 2018

Copy link
Copy Markdown
Contributor

@asvetlov

Copy link
Copy Markdown
Contributor Author

@willingc please review documentation changes.

@asvetlov asvetlov requested a review from willingc September 13, 2018 19:07

@willingc willingc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. A few tiny typos.

Comment thread Doc/library/asyncio-stream.rst Outdated

Write *data* to the stream.

The method doesn't apply control-flow, the call should be

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method doesn't apply control-flow. The call should be followed by...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread Doc/library/asyncio-stream.rst Outdated

Write a list (or any iterable) of bytes to the stream.

The method doesn't apply control-flow, the call should be

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same correction as above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,3 @@
Implement ``asyncio.StreamWriter.awrite`` and
``asyncio.StreamWriter.aclose()`` coroutines. Methods are needed for
providing consistent stream API with control flow switched on by default.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

providing a consistent

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@willingc willingc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @asvetlov.

@asvetlov

Copy link
Copy Markdown
Contributor Author

@willingc thanks for the review!

@asvetlov asvetlov merged commit 11194c8 into python:master Sep 13, 2018
@asvetlov asvetlov deleted the improve-streams branch September 13, 2018 23:53
Close the write end of the stream after the buffered write
data is flushed.

.. attribute:: transport

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually moved these sections down on purpose...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants