Skip to content

Conversation

@slateny
Copy link
Contributor

@slateny slateny commented Oct 25, 2022

https://docs.python.org/dev/library/asyncio-stream.html#asyncio.StreamReader

Perhaps the example under https://docs.python.org/dev/library/asyncio-stream.html#tcp-echo-client-using-streams can be adjusted to look like

    ...
    data = await reader.read(100)
    print(f'Received: {data.decode()!r}')

    async for line in reader:
        print(line)

    print('Close the connection')
    writer.close()
    ...

but it's optional

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

I can merge this if @kumaraditya303 is happy.

@JelleZijlstra JelleZijlstra added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Oct 26, 2022
@JelleZijlstra JelleZijlstra merged commit 4196ee5 into python:main Oct 26, 2022
@miss-islington
Copy link
Contributor

Thanks @slateny for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 26, 2022
)

(cherry picked from commit 4196ee5)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
@bedevere-bot
Copy link

GH-98690 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Oct 26, 2022
@bedevere-bot
Copy link

GH-98691 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Oct 26, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 26, 2022
)

(cherry picked from commit 4196ee5)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Oct 26, 2022
(cherry picked from commit 4196ee5)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Oct 26, 2022
(cherry picked from commit 4196ee5)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
@slateny slateny deleted the s/84747 branch October 26, 2022 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants