gh-56229: Document flush expectation for stdout and stderr replacements#153150
gh-56229: Document flush expectation for stdout and stderr replacements#153150ahmojo wants to merge 1 commit into
Conversation
Documentation build overview
|
5df1d7d to
3c4b232
Compare
|
I don't think this is correct to do or entirely accurate. The reason why My leaning is no new documentation here. Reading through the issue I think we should close it. The core issue was that code was always erroring but those errors used to be suppressed but are now shown thanks to improvements in error reporting. This falls into the general class of "make sure finalization works right" for custom I/O object stacks. In current CPython replacement with StringIO works well. For custom objects what is required depends on how they are implemented. also: Please do not force-push to CPython PR branches: https://devguide.python.org/getting-started/pull-request-lifecycle/#don-t-force-push |
Summary
Document that replacement
sys.stdoutandsys.stderrobjects should provideflush()because these streams are flushed during interpreter shutdown.What changed
Doc/library/sys.rst.Tests
git diff --checkDoc\make.bat check--fail-on-warningCloses #56229