Skip to content

bpo-33684: json.tool: Use utf-8 for infile and outfile. #17460

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 4 commits into from
Dec 4, 2019

Conversation

methane
Copy link
Member

@methane methane commented Dec 4, 2019

@methane
Copy link
Member Author

methane commented Dec 4, 2019

I confirmed that Windows CI fails on this test.

======================================================================
FAIL: test_non_ascii_infile (test.test_json.test_tool.TestTool)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "d:\a\1\s\lib\test\test_json\test_tool.py", line 115, in test_non_ascii_infile
    rc, out, err = assert_python_ok('-m', 'json.tool', infile)
  File "d:\a\1\s\lib\test\support\script_helper.py", line 157, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
  File "d:\a\1\s\lib\test\support\script_helper.py", line 143, in _assert_python
    res.fail(cmd_line)
  File "d:\a\1\s\lib\test\support\script_helper.py", line 70, in fail
    raise AssertionError("Process return code is %d\n"
AssertionError: Process return code is 1
command line: ['d:\\a\\1\\s\\PCbuild\\win32\\python.exe', '-X', 'faulthandler', '-I', '-m', 'json.tool', '@test_4856_tmp']

stdout:
---

---

stderr:
---
'charmap' codec can't decode byte 0x81 in position 10: character maps to <undefined>
---

@methane methane added needs backport to 3.7 type-bug An unexpected behavior, bug, or error labels Dec 4, 2019
@methane methane merged commit 808769f into python:master Dec 4, 2019
@methane methane deleted the json-tool-utf8 branch December 4, 2019 09:39
@miss-islington
Copy link
Contributor

Thanks @methane for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 4, 2019
@bedevere-bot
Copy link

GH-17464 is a backport of this pull request to the 3.8 branch.

@miss-islington
Copy link
Contributor

Sorry, @methane, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 808769f3a4cbdc47cf1a5708dd61b1787bb192d4 3.7

miss-islington added a commit that referenced this pull request Dec 4, 2019
@bedevere-bot
Copy link

GH-17465 is a backport of this pull request to the 3.7 branch.

methane added a commit that referenced this pull request Dec 4, 2019
(cherry picked from commit 808769f)

Co-authored-by: Inada Naoki <[email protected]>
jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants