]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45644: Make json.tool read infile before writing to outfile (GH-29273)
authorChris Wesseling <chris.wesseling@protonmail.com>
Sat, 6 Nov 2021 17:11:35 +0000 (18:11 +0100)
committerGitHub <noreply@github.com>
Sat, 6 Nov 2021 17:11:35 +0000 (18:11 +0100)
commit815dad42d53fc40a6dc057e067f4a8a885c3b858
tree11d228f4d9a4d56460e4a6470d30efba0128acba
parente9594f6747eaaaa848c26e2bf67d467aabfd62b3
bpo-45644:  Make json.tool read infile before writing to outfile (GH-29273)

so that

$ python -m json.tool foo.json foo.json

doesn't result in an empty foo.json.

Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Lib/json/tool.py
Lib/test/test_json/test_tool.py
Misc/NEWS.d/next/Library/2021-11-06-17-47-46.bpo-45644.ZMqHD_.rst [new file with mode: 0644]