| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. 👍
@vstinner, could you please look at this as the author of retry-on-interrupt logic?
Sorry, something went wrong.
Documentation build overview73 files changed · + 1 added · ± 72 modified + Added ± Modified |
Sorry, something went wrong.
A git command failed with fatal: shallow file has changed since we read it. |
Sorry, something went wrong.
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.
Sorry, something went wrong.
Co-authored-by: Victor Stinner <vstinner@python.org>
|
FileIO has a .readall() which is used several times in CPython so to duck type replace it with BufferedIO in my I/O plans need to add one calling through to .read(-1). Happy to do that as a small earlier feature add |
Sorry, something went wrong.
- Move to commas around nonessential phrase - Expand contraction
|
GH-150957 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
|
GH-150958 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
|
GH-150959 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
|
Merged, thanks for the improved io doc. |
Sorry, something went wrong.
…H-135328) (#150959) 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 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>
…H-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 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>
…H-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 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>
…ython#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" Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
| Back | FazBrowse Home | New Git URL |
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/