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

json.tool should catch BrokenPipeError · Issue #84009 · python/cpython · GitHub

Repository navigation

json.tool should catch BrokenPipeError #84009

Closed

Description

BPO 39828
Nosy @vstinner, @corona10, @zmwangx, @miss-islington, @remilapeyre, @hakancelik96
PRs
  • bpo-39828: Fix json.tool to catch BrokenPipeError. #18779
  • [3.8] bpo-39828: Fix json.tool to catch BrokenPipeError (GH-18779). #18894
  • [3.7] bpo-39828: Fix json.tool to catch BrokenPipeError (GH-18779). #18895
  • bpo-42005: Fix CLI of cProfile and profile to catch BrokenPipeError #22643
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-03-10.08:37:56.730>
    created_at = <Date 2020-03-02.15:30:28.518>
    labels = ['library', '3.9']
    title = 'json.tool should catch BrokenPipeError'
    updated_at = <Date 2020-10-11.05:53:53.376>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2020-10-11.05:53:53.376>
    actor = 'zmwangx'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-03-10.08:37:56.730>
    closer = 'vstinner'
    components = ['Library (Lib)']
    creation = <Date 2020-03-02.15:30:28.518>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39828
    keywords = ['patch']
    message_count = 7.0
    messages = ['363185', '363190', '363369', '363806', '363812', '363813', '363814']
    nosy_count = 6.0
    nosy_names = ['vstinner', 'corona10', 'zmwangx', 'miss-islington', 'remi.lapeyre', 'hakancelik']
    pr_nums = ['18779', '18894', '18895', '22643']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue39828'
    versions = ['Python 3.9']

    Activity

    1. vstinner commented on Mar 2, 2020

      MemberAuthor

      The json.tool module doesn't catch BrokenPipeError:
      -----------------------

      $ echo "{}" | python3 -m json.tool | true
      BrokenPipeError: [Errno 32] Broken pipe
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/usr/lib64/python3.7/runpy.py", line 193, in _run_module_as_main
          "__main__", mod_spec)
        File "/usr/lib64/python3.7/runpy.py", line 85, in _run_code
          exec(code, run_globals)
        File "/usr/lib64/python3.7/json/tool.py", line 45, in <module>
          main()
        File "/usr/lib64/python3.7/json/tool.py", line 41, in main
          outfile.write('\n')
      BrokenPipeError: [Errno 32] Broken pipe

      json.tool should catch BrokenPipeError.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      on Mar 2, 2020
    3. hakancelik96 commented on Mar 2, 2020

      hakancelik96mannequin
      Mannequin

      I'd like to work on this issue but what should it do when it captures that error.

    4. vstinner commented on Mar 4, 2020

      MemberAuthor

      See also bpo-39851: "tarfile: Exception ignored in (... stdout ...) BrokenPipeError" which is a different but similar issue.

    5. vstinner commented on Mar 10, 2020

      MemberAuthor

      New changeset 700cb58 by Dong-hee Na in branch 'master':
      bpo-39828: Fix json.tool to catch BrokenPipeError (GH-18779)
      700cb58

    6. miss-islington commented on Mar 10, 2020

      Contributor

      New changeset caec8a0 by Dong-hee Na in branch '3.8':
      [3.8] bpo-39828: Fix json.tool to catch BrokenPipeError (GH-18779). (GH-18894)
      caec8a0

    7. miss-islington commented on Mar 10, 2020

      Contributor

      New changeset 633957d by Dong-hee Na in branch '3.7':
      [3.7] bpo-39828: Fix json.tool to catch BrokenPipeError (GH-18779). (GH-18895)
      633957d

    8. vstinner commented on Mar 10, 2020

      MemberAuthor

      Thanks Dong-hee Na for the fix.

    9. transferred this issue fromon Apr 10, 2022
    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

      3.9 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directory

      Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL