gh-129011: Update docs for Raw I/O read, readinto, and write#135328
gh-129011: Update docs for Raw I/O read, readinto, and write#135328cmaloney wants to merge 4 commits into
Conversation
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"
|
This PR is stale because it has been open for 30 days with no activity. |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
LGTM. 👍
@vstinner, could you please look at this as the author of retry-on-interrupt logic?
Documentation build overview
73 files changed ·
|
A |
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I just have some minor formatting suggestions.
Sometimes, I wish that the io module has readall() and writeall() methods, similar to socket sendall() method.
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
- Move to commas around nonessential phrase - Expand contraction
Update
RawIOBaseandFileIOdocumentation to match implementation behavior around.read,.readinto,.readalland.write..write()requires a wrapping retry loop (see: Corrupt .pyc files stay on disk after failed writes #126606).writemay not write all bytesbuffering=0example results in a "Raw I/O"see also: gh-80050 / GH-130653 (similar work on Buffered I/O read docs)
📚 Documentation preview 📚: https://cpython-previews--135328.org.readthedocs.build/