regrtest can fail writing unencodable test description or status #135124
Copy link
Copy link
Closed
Labels
3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytestsTests in the Lib/test dirTests in the Lib/test dirtopic-unicodetype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
I already fixed errors related to non-ASCII skip messages (by using ascii() instead of str() or repr()). There may be other non-ASCII skip messages left, but they are not raised on buildbots with non-UTF-8 stdout. In any case, this only fixed CPython tests, user tests can have the same issues.
#135121 exposed a new issue -- subtest description which includes non-ASCII parameter values. It is more difficult, because we have no control on formatting them. Always using ascii() instead of repr() will harm readability on normal platforms.
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytestsTests in the Lib/test dirTests in the Lib/test dirtopic-unicodetype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
serhiy-storchaka commentedon Jun 4, 2025
The following tests passes in
unittestand inlibregrtestwith a single process, but fails inlibregrtestwith multiple processes.When run with
unittest, the output stream is stderr with the backslashreplace error handler. Inlibregrtestwith a single process, the output stream is stdout with the backslashreplace error handler, but in multi-process mode -- with the strict error handler.serhiy-storchaka commentedon Jun 4, 2025
cc @vstinner
pythongh-135124: Change stdout errors in regrtest worker process
pythongh-135124: Change stdout errors in regrtest worker process
pythongh-135124: Change stdout errors in regrtest worker process
vstinner commentedon Jun 4, 2025
I proposed #135138 to fix the issue.
[-]unittest can fail writing unencodable test description or status[/-][+]regrtest can fail writing unencodable test description or status[/+]gh-135124: Change stdout errors in regrtest worker process (#135138)
pythongh-135124: Change stdout errors in regrtest worker process (pyt…
pythongh-135124: Change stdout errors in regrtest worker process (pyt…
[3.14] gh-135124: Change stdout errors in regrtest worker process (GH…
[3.13] gh-135124: Change stdout errors in regrtest worker process (GH…
pythongh-135124: Change stdout errors in regrtest worker process (pyt…
pythongh-135124: Change stdout errors in regrtest worker process (pyt…
pythongh-135124: Change stdout errors in regrtest worker process (pyt…