-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-135648: Document that shutil.copyfileobj
doesn't flush
#135737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The documentation for :func:`shutil.copyfileobj` now warns the user of the | ||
need to close or flush the destination stream on completion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Documentation
blurb section is usually used for meta changes, e.g. tags or theme, and not entries about changes in the docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that a NEWS entry is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
Thanks @freakboy3742! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @freakboy3742 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…thonGH-135737) Adds a note about flush/close on copyfileobj, and updates the Emscripten build script to follow documented advice. (cherry picked from commit 34393cbdd46fd965de86f1e7bc89ab111f506723) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
GH-135873 is a backport of this pull request to the 3.14 branch. |
Document that
shutil.copyfileobj()
doesn't flush the destination stream on completion, so file content may not be reliably available.Modifies the Emscripten build script to avoid the problem that the documentation is warning about.
shutil.copyfileobj()
doesn't flush at end of copy #135648📚 Documentation preview 📚: https://cpython-previews--135737.org.readthedocs.build/