Skip to content

gh-129011: Update docs for Raw I/O read, readinto, and write#135328

Open
cmaloney wants to merge 2 commits into
python:mainfrom
cmaloney:rawio_retry_nonblock
Open

gh-129011: Update docs for Raw I/O read, readinto, and write#135328
cmaloney wants to merge 2 commits into
python:mainfrom
cmaloney:rawio_retry_nonblock

Conversation

@cmaloney
Copy link
Copy Markdown
Contributor

@cmaloney cmaloney commented Jun 10, 2025

Update RawIOBase and FileIO documentation to match implementation behavior around .read, .readinto, .readall and .write.

see also: gh-80050 / GH-130653 (similar work on Buffered I/O read docs)


📚 Documentation preview 📚: https://cpython-previews--135328.org.readthedocs.build/

Update `RawIOBase` and `FileIO` documentation to match implementation
behavior around `.read`, `.readinto`, `.readall` and `.write`.

In particular:

 - They may make more than one system call (PEP-475)
 - Add warnings if `.write()` requires a wrapping retry loop (see: pythongh-126606)
    - "Raw I/O" `.write`` may not write all bytes
    - `buffering=0` example results in a "Raw I/O"
@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 26, 2026
@cmaloney cmaloney removed the stale Stale PR or inactive for long period of time. label Apr 26, 2026
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. 👍

@vstinner, could you please look at this as the author of retry-on-interrupt logic?

@serhiy-storchaka serhiy-storchaka requested a review from vstinner June 2, 2026 17:08
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jun 2, 2026
@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32958701 | 📁 Comparing a3b58e4 against main (f7e0fb6)

  🔍 Preview build  

1 file changed
± library/io.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants