-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-45644: Make json.tool read infile before writing to outfile #29273
Conversation
So that $ python -m json.tool foo.json foo.json doens't result in an empty foo.json.
Fix failing tests.
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
This seems to be a duplicate of https://bugs.python.org/issue33927 |
Wrong bpo number. |
@tirkarthi Looks like it is. Sorry for not searching thoroughly enough. I just bumped into this, already spent time trying to remember the name of I've had a look and #7865 looks overly complex to me. |
Would you write a NEWS entry? |
Thanks @CharString for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
…onGH-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> (cherry picked from commit 815dad4) Co-authored-by: Chris Wesseling <chris.wesseling@protonmail.com>
GH-29445 is a backport of this pull request to the 3.10 branch. |
GH-29446 is a backport of this pull request to the 3.9 branch. |
…onGH-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> (cherry picked from commit 815dad4) Co-authored-by: Chris Wesseling <chris.wesseling@protonmail.com>
Thanks everyone involved (bots included) for making this as pleasant a process as it could be. |
…onGH-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>
…onGH-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>
So that
$ python -m json.tool foo.json foo.json
doens't result in an empty foo.json, but with a reformatted version of the original.
https://bugs.python.org/issue45644