-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
tools: allow test tap output to include Unicode characters #47175
Conversation
CC @nodejs/python @richardlau |
Well this doesn't look quite right 😆: 17:24:54 b'ok 2119 parallel/test-readline-async-iterators'
17:24:54 ---
17:24:54 duration_ms: 10.526
17:24:54 ...
17:24:55 b'ok 2120 parallel/test-repl-history-perm'
17:24:55 ---
17:24:55 duration_ms: 0.118
17:24:55 ... Note the "b" prefix and single quotes. This results in: |
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.
If you want the second representation (b'L\xc3\xbcsai'
) instead of the first (Lüsai
) then I approve.
>>> import logging
>>> logger = logging.getLogger()
>>> logger.warning("Lüsai")
Lüsai
>>> logger.warning("Lüsai".encode("utf-8"))
b'L\xc3\xbcsai'
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.
2b47470
to
f83d168
Compare
Fast-track has been requested by @MoLow. Please 👍 to approve. |
Landed in f5eedf4 |
PR-URL: #47175 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Christian Clauss <cclauss@me.com>
PR-URL: #47175 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Christian Clauss <cclauss@me.com>
PR-URL: #47175 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Christian Clauss <cclauss@me.com>
Fixes #47173
the issue can be easily reproduced locally by adding
sys.stdout.reconfigure(encoding='ascii')
to the beginning oftools/test.py