This is a feature proposal for allowing python3 -m json to work in addition to python -m json.tool and softly deprecating the use of python3 -m json.tool.
I made a branch to see what these changes might look like.
Here is a separate branch which issues a DeprecationWarning .
However, since json.tool will continue working that warning may cause more hassle for end users than is worthwhile.
I think the no-warning approach may be more sensible.
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Activity
ncoghlan commented on Aug 10, 2024
The "No warning" branch looks good to me (it would just need docs and News for me to approve a PR)
Eclips4 commented on Aug 10, 2024
Hi @hugovk! Just a quick note: type-feature label doesn't require a version label: https://devguide.python.org/triage/labels/#type-labels
hugovk commented on Aug 10, 2024
Agreed.
And change this in Lib/json/tool.py?
@treyhunner Would you like to put together a PR?
treyhunner commented on Aug 10, 2024
I will put together a PR shortly. 👍
rhettinger commented on Aug 10, 2024
+1 from me
hugovk commented on Aug 11, 2024
PR is here: #122884
gh-122873: Allow "python -m json" to work (#122884)
pythongh-122873: Allow "python -m json" to work (python#122884)