]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] 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:09:13 +0000 (14:09 +0200)
committerGitHub <noreply@github.com>
Fri, 5 Jun 2026 12:09:13 +0000 (12:09 +0000)
commitd8af158eb6e16ee5494b6e16c800f9fe7eee9295
tree24fac7caae841760cecc7003fdc21184e075441d
parent675ed8a7490f221f228d7bc75263e4195e6139a4
[3.15] gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328) (#150957)

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