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

Allow "-m json" instead of "-m json.tool" · Issue #122873 · python/cpython · GitHub

Repository navigation

Allow "-m json" instead of "-m json.tool" #122873

Closed

Description

Feature or enhancement

Proposal:

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

Links to previous discussion of this feature:

Discussion in Ideas discuss thread

Linked PRs

Activity

  1. ncoghlan commented on Aug 10, 2024

    Contributor

    The "No warning" branch looks good to me (it would just need docs and News for me to approve a PR)

  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Aug 10, 2024
  3. Eclips4 commented on Aug 10, 2024

    Member

    Hi @hugovk! Just a quick note: type-feature label doesn't require a version label: https://devguide.python.org/triage/labels/#type-labels

  4. hugovk commented on Aug 10, 2024

    Member

    The "No warning" branch looks good to me (it would just need docs and News for me to approve a PR)

    Agreed.

    And change this in Lib/json/tool.py?

     def main():
    -    prog = 'python -m json.tool'
    +    prog = 'python -m json'

    @treyhunner Would you like to put together a PR?

  5. treyhunner commented on Aug 10, 2024

    MemberAuthor

    I will put together a PR shortly. 👍

  6. rhettinger commented on Aug 10, 2024

    Contributor

    +1 from me

  7. hugovk commented on Aug 11, 2024

    Member

    PR is here: #122884

  8. added a commit that references this issue on Aug 13, 2024
  9. added a commit that references this issue on Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL