8000 gh-81322: support multiple separators in Stream.readuntil by bmerry · Pull Request #16429 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-81322: support multiple separators in Stream.readuntil #16429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix comment
len(separator) would be the number of separators, which makes no sense.
  • Loading branch information
gvanrossum authored Apr 8, 2024
commit bee5ebe58a9763469af615d965074e0979fabe59
2 changes: 1 addition & 1 deletion Lib/asyncio/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ async def readuntil(self, separator=b'\n'):
# separator[-1]='SEPARATOR':
# * we have received almost complete separator (without last
# byte). i.e buffer='some textSEPARATO'. In this case we
# can safely consume len(separator) - 1 bytes.
# can safely consume max_seplen - 1 bytes.
# * last byte of buffer is first byte of separator, i.e.
# buffer='abcdefghijklmnopqrS'. We may safely consume
# everything except that last byte, but this require to
Expand Down
0