bpo-41525: Make the Python program help ASCII-only#21836
bpo-41525: Make the Python program help ASCII-only#21836pablogsal merged 3 commits intopython:masterfrom
Conversation
| self.assertIn(b'usage', lines[0]) | ||
| # The first line contains the program name, | ||
| # but the rest should be ASCII-only | ||
| b''.join(lines[1:]).decode('ascii') |
There was a problem hiding this comment.
Would decoding each line separately be faster?
There was a problem hiding this comment.
No, decoding one large string at once is faster.
| nested imports). Note that its output may be broken in multi-threaded\n\ | ||
| application. Typical usage is python3 -X importtime -c 'import asyncio'\n\ | ||
| -X dev: enable CPython’s “development mode”, introducing additional runtime\n\ | ||
| -X dev: enable CPython's \"development mode\", introducing additional runtime\n\ |
There was a problem hiding this comment.
Even though conversion would be a different issue, I am curious whether there is any good reason to not use """ quotes for the string instead of "s and '\n\' and '"'.
|
@serhiy-storchaka There is some problem with the CI and the last commit. I am going to push an amended commit (git commit --amend --noedit) to unblock the CI |
89b32d5 to
191d3b5
Compare
|
Thanks @serhiy-storchaka for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
(cherry picked from commit 58de1dd) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
GH-22162 is a backport of this pull request to the 3.9 branch. |
(cherry picked from commit 58de1dd) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
GH-22163 is a backport of this pull request to the 3.8 branch. |
|
Thank you Pablo! |
https://bugs.python.org/issue41525