FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-122873: Allow "python3 -m json" to work by treyhunner · Pull Request #122884 · python/cpython · GitHub

Repository navigation

gh-122873: Allow "python3 -m json" to work - #122884

Merged
AA-Turner merged 24 commits into
python:mainfrom
treyhunner:json-script2
Aug 13, 2024
Merged

AA-Turner merged 24 commits into
python:mainfrom
treyhunner:json-script2

Conversation

treyhunner commented Aug 10, 2024 •
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Member

Allow python3 -m json to work in addition to python3 -m json.tool and update documentation to use python3 -m json instead of python3 -m json.tool.

Issue: #122873


📚 Documentation preview 📚: https://cpython-previews--122884.org.readthedocs.build/

Comment thread Doc/library/json.rst Outdated
Comment thread Doc/library/json.rst Outdated
Comment thread Lib/json/__main__.py Outdated
Comment thread Lib/json/__main__.py Outdated

Copy link
Copy Markdown
Member Author

Thank you @AA-Turner for reviewing. Let me know if you'd like any variation of the suggestions I commented on made.

I just used blurb to add a NEWS.d entry as well.
I wrote the same copy as in "What's New".
I'm fuzzy on the use of "What's New" and NEWS.d, so please correct me if either should be updated or removed.

treyhunner and others added 3 commits August 10, 2024 14:38
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

Copy link
Copy Markdown
Member

I just used blurb to add a NEWS.d entry as well.
I wrote the same copy as in "What's New".
I'm fuzzy on the use of "What's New" and NEWS.d, so please correct me if either should be updated or removed.

NEWS.d goes into the full changelog, whatsnes is for bigger or user visible changes. Using the same text for both is fine, you've done the right thing here.

A

hugovk commented Aug 10, 2024

Copy link
Copy Markdown
Member

I'm fuzzy on the use of "What's New" and NEWS.d, so please correct me if either should be updated or removed.

We do want both.

"What's New" is the main set release notes. This'll be the main document people read about the release (~30k views/month):

https://docs.python.org/3.14/whatsnew/3.14.html#json

NEWS.d files eventually becomes part of the giant changelog, not read so often (~4k views/month), but can be useful to filter via the search box:

https://docs.python.org/3.14/whatsnew/changelog.html

hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Let's also change ./Doc/library/cmdline.rst:

-* :ref:`json.tool <json-commandline>`
+* :ref:`json <json-commandline>`

https://cpython-previews--122884.org.readthedocs.build/en/122884/library/cmdline.html

For the What's New and NEWS.d, shall we also mention python -m json explicitly, and include a link to the json-commandline reference?

And there's some json.tool -> json we can update in the Lib/json/__init__.py docstring.

Comment thread Doc/whatsnew/3.14.rst Outdated

ncoghlan left a comment •
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

PR mostly looks good to me, just some comments inline around keeping a minimal level of json.tool documentation (since the submodule still exists and isn't going anywhere).

Comment thread Doc/library/json.rst Outdated
Comment thread Doc/library/json.rst
Comment thread Doc/library/json.rst Outdated
Comment thread Doc/whatsnew/3.14.rst Outdated
Comment thread Lib/json/tool.py
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
treyhunner and others added 3 commits August 12, 2024 07:01
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>

hugovk commented Aug 13, 2024 •
edited
Loading

Copy link
Copy Markdown
Member

I think this is almost ready!

Please also change Doc/library/cmdline.rst:

-* :ref:`json.tool <json-commandline>`
+* :ref:`json <json-commandline>`

https://cpython-previews--122884.org.readthedocs.build/en/122884/library/cmdline.html

Copy link
Copy Markdown
Member Author

I think this is almost ready!

Please also change Doc/library/cmdline.rst:

-* :ref:`json.tool <json-commandline>`
+* :ref:`json <json-commandline>`

https://cpython-previews--122884.org.readthedocs.build/en/122884/library/cmdline.html

Just updated.

I had no idea this page existed. I wish I had known about it when writing my post on Python's CLIs! 😆

hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you!

AA-Turner merged commit 906b796 into python:main Aug 13, 2024

Copy link
Copy Markdown
Member

Thanks @treyhunner!

A

treyhunner deleted the json-script2 branch August 13, 2024 16:10
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL