-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
regrtest can fail writing unencodable test description or status #135124
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
Comments
The following tests passes in import unittest
class TestNonASCII(unittest.TestCase):
def test_docstring(self):
"""\u20ac"""
def test_subtest(self):
with self.subTest(param='\u20ac'):
pass
def test_skip(self):
self.skipTest('\u20ac') When run with |
cc @vstinner |
Set sys.stdout encoder error handler to backslashreplace in regrtest to avoid UnicodeEncodeError when printing a traceback or any other non-encodable character. Move the code from the Regrtest class to test.libregrtest.setup module. Call setup_process() before displaying regrtest headers.
Set sys.stdout encoder error handler to backslashreplace in regrtest to avoid UnicodeEncodeError when printing a traceback or any other non-encodable character. Move the code from the Regrtest class to setup_process(). Call setup_process() before displaying regrtest headers.
Set sys.stdout encoder error handler to backslashreplace in regrtest to avoid UnicodeEncodeError when printing a traceback or any other non-encodable character. Move the code from the Regrtest class to setup_process(). Call setup_process() before displaying regrtest headers.
I proposed #135138 to fix the issue. |
Set sys.stdout encoder error handler to backslashreplace in regrtest workers to avoid UnicodeEncodeError when printing a traceback or any other non-encodable character. Move the code from the Regrtest class to setup_process(). Call setup_process() earlier, before displaying regrtest headers.
…honGH-135138) Set sys.stdout encoder error handler to backslashreplace in regrtest workers to avoid UnicodeEncodeError when printing a traceback or any other non-encodable character. Move the code from the Regrtest class to setup_process(). Call setup_process() earlier, before displaying regrtest headers. (cherry picked from commit 3d396ab) Co-authored-by: Victor Stinner <vstinner@python.org>
…honGH-135138) Set sys.stdout encoder error handler to backslashreplace in regrtest workers to avoid UnicodeEncodeError when printing a traceback or any other non-encodable character. Move the code from the Regrtest class to setup_process(). Call setup_process() earlier, before displaying regrtest headers. (cherry picked from commit 3d396ab) Co-authored-by: Victor Stinner <vstinner@python.org>
…-135138) (#135168) gh-135124: Change stdout errors in regrtest worker process (GH-135138) Set sys.stdout encoder error handler to backslashreplace in regrtest workers to avoid UnicodeEncodeError when printing a traceback or any other non-encodable character. Move the code from the Regrtest class to setup_process(). Call setup_process() earlier, before displaying regrtest headers. (cherry picked from commit 3d396ab) Co-authored-by: Victor Stinner <vstinner@python.org>
…-135138) (#135169) gh-135124: Change stdout errors in regrtest worker process (GH-135138) Set sys.stdout encoder error handler to backslashreplace in regrtest workers to avoid UnicodeEncodeError when printing a traceback or any other non-encodable character. Move the code from the Regrtest class to setup_process(). Call setup_process() earlier, before displaying regrtest headers. (cherry picked from commit 3d396ab) Co-authored-by: Victor Stinner <vstinner@python.org>
Uh oh!
There was an error while loading. Please reload this page.
Bug report
I already fixed errors related to non-ASCII skip messages (by using
ascii()
instead ofstr()
orrepr()
). 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 ofrepr()
will harm readability on normal platforms.Linked PRs
The text was updated successfully, but these errors were encountered: