Skip to content

gh-133711: Fix test_regrtest for PYTHONUTF8=1 #134839

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

Merged
merged 1 commit into from
May 28, 2025

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented May 28, 2025

Use "backslashreplace" error handler to decode stdout and stderr. Example:

vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91>
"C:\victor\python\main\PCbuild\amd64\python_d.exe"  -m test
--fast-ci --slow-ci --testdir
C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da
test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3
test_regrtest_noop4

Notice the "\x91" byte at the end of the first line: it's the non-ASCII U+00E6 character encoded to the OEM cp437 code page.

Use "backslashreplace" error handler to decode stdout and stderr.
Example:

    vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91>
    "C:\victor\python\main\PCbuild\amd64\python_d.exe"  -m test
    --fast-ci --slow-ci --testdir
    C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da
    test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3
    test_regrtest_noop4

Notice the "\x91" byte at the end of the first line: it's the
non-ASCII U+00E6 character encoded to the OEM cp437 code page.
@vstinner
Copy link
Member Author

Follow-up PR: #134840 "Log Windows OEM code page in test.pythoninfo".

@vstinner vstinner merged commit 9161827 into python:main May 28, 2025
48 checks passed
@vstinner vstinner deleted the regrtest_utf8 branch May 28, 2025 15:19
@miss-islington-app
Copy link

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 28, 2025
Use "backslashreplace" error handler to decode stdout and stderr.
Example:

    vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91>
    "C:\victor\python\main\PCbuild\amd64\python_d.exe"  -m test
    --fast-ci --slow-ci --testdir
    C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da
    test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3
    test_regrtest_noop4

Notice the "\x91" byte at the end of the first line: it's the
non-ASCII U+00E6 character encoded to the OEM cp437 code page.
(cherry picked from commit 9161827)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link

bedevere-app bot commented May 28, 2025

GH-134842 is a backport of this pull request to the 3.14 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 28, 2025
Use "backslashreplace" error handler to decode stdout and stderr.
Example:

    vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91>
    "C:\victor\python\main\PCbuild\amd64\python_d.exe"  -m test
    --fast-ci --slow-ci --testdir
    C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da
    test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3
    test_regrtest_noop4

Notice the "\x91" byte at the end of the first line: it's the
non-ASCII U+00E6 character encoded to the OEM cp437 code page.
(cherry picked from commit 9161827)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 28, 2025
@bedevere-app
Copy link

bedevere-app bot commented May 28, 2025

GH-134843 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 28, 2025
vstinner added a commit that referenced this pull request May 28, 2025
…4843)

gh-133711: Fix test_regrtest for PYTHONUTF8=1 (GH-134839)

Use "backslashreplace" error handler to decode stdout and stderr.
Example:

    vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91>
    "C:\victor\python\main\PCbuild\amd64\python_d.exe"  -m test
    --fast-ci --slow-ci --testdir
    C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da
    test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3
    test_regrtest_noop4

Notice the "\x91" byte at the end of the first line: it's the
non-ASCII U+00E6 character encoded to the OEM cp437 code page.
(cherry picked from commit 9161827)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this pull request May 28, 2025
…4842)

gh-133711: Fix test_regrtest for PYTHONUTF8=1 (GH-134839)

Use "backslashreplace" error handler to decode stdout and stderr.
Example:

    vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91>
    "C:\victor\python\main\PCbuild\amd64\python_d.exe"  -m test
    --fast-ci --slow-ci --testdir
    C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da
    test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3
    test_regrtest_noop4

Notice the "\x91" byte at the end of the first line: it's the
non-ASCII U+00E6 character encoded to the OEM cp437 code page.
(cherry picked from commit 9161827)

Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant