]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45644: Make json.tool read infile before writing to outfile (GH-29273) (GH-29446)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 6 Nov 2021 18:01:44 +0000 (11:01 -0700)
committerGitHub <noreply@github.com>
Sat, 6 Nov 2021 18:01:44 +0000 (19:01 +0100)
commita932631890d148444e5f9b09f4b57305475d6386
tree64028590f7c733b8b7cdf88b63fade28a5782e41
parent5017306c8732b3ceda878db13088f8c2cf0c5e71
bpo-45644:  Make json.tool read infile before writing to outfile (GH-29273) (GH-29446)

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>
(cherry picked from commit 815dad42d53fc40a6dc057e067f4a8a885c3b858)

Co-authored-by: Chris Wesseling <chris.wesseling@protonmail.com>
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]