Repository navigation
Document the real readuntil() signature - #13686
Conversation
The documented signature passes a str separator, but StreamReader.readuntil takes bytes, so the documented call raises TypeError. It also omits the keyword-only max_size argument entirely.
2da49c8 to
6e619ad
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
Confidence Score: 5/5Safe to merge: the documentation matches the implemented No actionable issues were found. Focused runtime checks covered the default separator, keyword-only argument enforcement, explicit size limits, and high-water fallback; the relevant existing tests also passed. Files Needing Attention: No files need further changes.
What T-Rex did
Reviews (1): Last reviewed commit: "Add changelog fragment" | Re-trigger Greptile |
Backport to 3.15: 💚 backport PR created✅ Backport PR branch: Backported as #13806 🤖 @patchback |

What do these changes do?
docs/streams.rstdocumentsStreamReader.readuntilas taking astrseparator:The implementation takes
bytes(aiohttp/streams.py:381), so the documented call raisesTypeError. The prose directly under the directive already says "whereseparatoris a sequence of bytes", so the signature line contradicts the sentence below it as well as the code.max_sizeis keyword-only and appears nowhere indocs/.Are there changes in behavior for the user?
No. Documentation only — the rendered signature becomes
readuntil(separator=b'\n', *, max_size=None).Is it a substantial burden for the maintainers to support this?
No. One directive line plus one
:param:in a single.rst.Related issue number
None filed; found by comparing documented signatures against real ones.
Checklist
CONTRIBUTORS.txtCHANGES/Verified on macOS arm64, Python 3.14, pure-Python mode:
tests/test_streams.py136 passed, and the docs build renders the corrected signature. I did not run the full suite or build the Cython extensions, which this does not touch.Drafted with Claude Opus 5; reviewed by hxperl.