]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328) ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 5 Jun 2026 12:08:49 +0000 (14:08 +0200)
committerGitHub <noreply@github.com>
Fri, 5 Jun 2026 12:08:49 +0000 (12:08 +0000)
commit7e48fc17490df3f1446f338a75167a273526489f
treeea6ca51a54a4cbd46376a8dd1e7205b84ab18852
parent4f17f6e04534d93fbd23862f9f290d3a281ab30b
[3.14] gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328) (#150958)

gh-129011: Update docs for Raw I/O read, readinto, and write (GH-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: gh-126606)
    - "Raw I/O" `.write`` may not write all bytes
    - `buffering=0` example results in a "Raw I/O"
(cherry picked from commit e4db68b9c990ed1bb7562094bee2e73f4450d42b)

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>
Doc/library/io.rst