8000 GH-133711: Enable UTF-8 mode by default (PEP 686) by AA-Turner · Pull Request #133712 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-133711: Enable UTF-8 mode by default (PEP 686) #133712

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 14 commits into from
Jul 15, 2025
Merged
Prev Previous commit
Next Next commit
Fix test_cmd_line
  • Loading branch information
AA-Turner committed May 10, 2025
commit f095ab00b65ab7f30127bbd00ee116efe8643d31
5 changes: 3 additions & 2 deletions Lib/test/test_cmd_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,9 +976,10 @@ def test_python_legacy_windows_fs_encoding(self):

@unittest.skipUnless(support.MS_WINDOWS, 'Test only applicable on Windows')
def test_python_legacy_windows_stdio(self):
code = "import sys; print(sys.stdin.encoding, sys.stdout.encoding)"
code = 'import sys; print(sys.stdin.encoding, sys.stdout.encoding)'
expected = 'cp'
rc, out, err = assert_python_ok('-c', code, PYTHONLEGACYWINDOWSSTDIO='1')
rc, out, err = assert_python_ok('-Xutf8=0', '-c', code,
PYTHONLEGACYWINDOWSSTDIO='1')
self.assertIn(expected.encode(), out)

@unittest.skipIf("-fsanitize" in sysconfig.get_config_vars().get('PY_CFLAGS', ()),
Expand Down
0