Skip to content

Add docstrings to StreamReader and DataQueue public methods#12309

Closed
mastash3ff wants to merge 3 commits intoaio-libs:masterfrom
mastash3ff:docs/add-streams-docstrings
Closed

Add docstrings to StreamReader and DataQueue public methods#12309
mastash3ff wants to merge 3 commits intoaio-libs:masterfrom
mastash3ff:docs/add-streams-docstrings

Conversation

@mastash3ff
Copy link
Copy Markdown

What do these changes do?

Adds docstrings to all undocumented public methods on StreamReader, DataQueue, and the supporting iterator classes (AsyncStreamIterator, ChunkTupleAsyncStreamIterator, AsyncStreamReaderMixin) in aiohttp/streams.py.

These are core public APIs consumed by virtually all aiohttp users, but most methods had no docstrings. Each new docstring concisely describes the method's behavior, return values, and exceptions raised.

Are there changes in behavior for the user?

No. This is a documentation-only change — no logic, tests, or runtime behavior is modified.

Is it a substantial burden for the maintainers to support this?

No. Pure docstring additions with no functional impact.

Related issue number

N/A — general documentation improvement.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
  • Add a new news fragment into the CHANGES/ folder
    • 0.doc.rst — will rename to match PR number after creation

The StreamReader and DataQueue classes in aiohttp/streams.py are
core public APIs used extensively by aiohttp consumers, but most
of their public methods lacked docstrings. This adds concise
docstrings describing the behavior, return values, and exceptions
for all undocumented public methods on both classes, as well as
class-level docstrings for the supporting iterator types.
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Apr 1, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.11%. Comparing base (bced1bc) to head (09c004a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12309      +/-   ##
==========================================
- Coverage   99.11%   99.11%   -0.01%     
==========================================
  Files         130      130              
  Lines       45558    45558              
  Branches     2404     2404              
==========================================
- Hits        45156    45155       -1     
  Misses        272      272              
- Partials      130      131       +1     
Flag Coverage Δ
CI-GHA 98.97% <ø> (-0.01%) ⬇️
OS-Linux 98.71% <ø> (-0.01%) ⬇️
OS-Windows 96.99% <ø> (ø)
OS-macOS 97.87% <ø> (-0.01%) ⬇️
Py-3.10.11 97.42% <ø> (ø)
Py-3.10.20 97.89% <ø> (-0.01%) ⬇️
Py-3.11.15 98.10% <ø> (+<0.01%) ⬆️
Py-3.11.9 97.63% <ø> (ø)
Py-3.12.10 97.72% <ø> (-0.01%) ⬇️
Py-3.12.13 98.20% <ø> (+<0.01%) ⬆️
Py-3.13.12 98.44% <ø> (ø)
Py-3.14.3 98.50% <ø> (+<0.01%) ⬆️
Py-3.14.3t 97.50% <ø> (-0.01%) ⬇️
Py-pypy3.11.15-7.3.21 97.37% <ø> (-0.02%) ⬇️
VM-macos 97.87% <ø> (-0.01%) ⬇️
VM-ubuntu 98.71% <ø> (-0.01%) ⬇️
VM-windows 96.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 1, 2026

Merging this PR will not alter performance

✅ 59 untouched benchmarks


Comparing mastash3ff:docs/add-streams-docstrings (09c004a) with master (bced1bc)

Open in CodSpeed

@mastash3ff
Copy link
Copy Markdown
Author

Closing — this PR was opened by an automated contribution agent that has been disabled. Apologies for the noise.

@mastash3ff mastash3ff closed this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant