diff options
author | Jeff Epler <jepler@gmail.com> | 2025-05-09 21:26:26 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-05-16 11:52:03 +1000 |
commit | 605eda158de4f40ba03e15fa183a178f7cf1a1da (patch) | |
tree | 7a0da854c8cb855a26fc9b658f19cc7290e64e68 /docs/esp32 | |
parent | 2f97d1dd28a7e2d34df268676e533944410aab42 (diff) |
tools/gen-cpydiff.py: Improve stdout vs stderr interleaving.
In the syntax_space cpydiff, all the warnings were shown after the other
output. This is because the output always showed all of stdout first and
all of stdout second.
By running Python in unbuffered mode and using `stderr=STDOUT`, the two
streams are interleaved in exactly the order they're printed, so the
SyntaxWarnings are interleaved with the other output.
By using the `encoding=` argument of Popen, the need to explicitly convert
to utf-8 is avoided. The encoding of the input also becomes utf-8 in this
case, which all the test cases are (well, they're all ASCII, I think). As
in `run-tests.py`, setting PYTHONIOENCODING ensures the Python
interpreter's input and output are in utf-8, which is not always the case,
especially on Windows systems.
I spot-checked the generated doc pages and they all seemed to make sense
still.
Signed-off-by: Jeff Epler <jepler@gmail.com>
Diffstat (limited to 'docs/esp32')
0 files changed, 0 insertions, 0 deletions