diff options
author | Bruce Merry <1963944+bmerry@users.noreply.github.com> | 2024-04-11 14:41:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 14:41:55 (GMT) |
commit | 01a51f949475f1590eb5899f3002304060501ab2 (patch) | |
tree | 88528120d948fd0b392f0628a02ad57230f29f4f /Misc | |
parent | 898f6de63fd5285006ee0f4993aeb8ed3e8f97f9 (diff) | |
download | cpython-01a51f949475f1590eb5899f3002304060501ab2.zip cpython-01a51f949475f1590eb5899f3002304060501ab2.tar.gz cpython-01a51f949475f1590eb5899f3002304060501ab2.tar.bz2 |
gh-117722: Fix Stream.readuntil with non-bytes buffer objects (#117723)
gh-16429 introduced support for an iterable of separators in
Stream.readuntil. Since bytes-like types are themselves iterable, this
can introduce ambiguities in deciding whether the argument is an
iterator of separators or a singleton separator. In gh-16429, only 'bytes'
was considered a singleton, but this will break code that passes other
buffer object types.
Fix it by only supporting tuples rather than arbitrary iterables.
Closes gh-117722.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2024-04-10-20-59-10.gh-issue-117722.oxIUEI.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2024-04-10-20-59-10.gh-issue-117722.oxIUEI.rst b/Misc/NEWS.d/next/Library/2024-04-10-20-59-10.gh-issue-117722.oxIUEI.rst new file mode 100644 index 0000000..de99988 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-04-10-20-59-10.gh-issue-117722.oxIUEI.rst @@ -0,0 +1,2 @@ +Change the new multi-separator support in :meth:`asyncio.Stream.readuntil` +to only accept tuples of separators rather than arbitrary iterables. |