Skip to content

[3.13] gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328)#150959

Merged
vstinner merged 1 commit into
python:3.13from
miss-islington:backport-e4db68b-3.13
Jun 5, 2026
Merged

[3.13] gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328)#150959
vstinner merged 1 commit into
python:3.13from
miss-islington:backport-e4db68b-3.13

Conversation

@miss-islington
Copy link
Copy Markdown
Contributor

@miss-islington miss-islington commented Jun 5, 2026

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

In particular:

Co-authored-by: Cody Maloney cmaloney@users.noreply.github.com
Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Victor Stinner vstinner@python.org

…ythonGH-135328)

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"
(cherry picked from commit e4db68b)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels Jun 5, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Jun 5, 2026
@vstinner vstinner enabled auto-merge (squash) June 5, 2026 12:01
@vstinner vstinner merged commit 0918ad4 into python:3.13 Jun 5, 2026
28 of 29 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jun 5, 2026
@miss-islington miss-islington deleted the backport-e4db68b-3.13 branch June 5, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants