Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JSON CLI: I/O operation on closed file" when parsing JSON Lines file #132631

Open
Labels
3.13bugs and security fixes3.14bugs and security fixesstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error
@hugovk

Description

@hugovk

Bug report

Bug description:

With any JSON Lines file, such as:

cat input.jsonl{"ingredients":["frog", "water", "chocolate", "glucose"]}{"ingredients":["chocolate","steel bolts"]}

This works on Python 3.12:

python3.12 --versionPython 3.12.10python3.12 -m json.tool --json-lines input.jsonl{    "ingredients": [        "frog",        "water",        "chocolate",        "glucose"    ]}{    "ingredients": [        "chocolate",        "steel bolts"    ]}

But not 3.13 or higher:

python3.13 --versionPython 3.13.3python3.13 -m json.tool --json-lines input.jsonlI/O operation on closed file.python3.14 --versionPython 3.14.0a7python3.14 -m json.tool --json-lines input.jsonlI/O operation on closed file../python.exe --version --versionPython 3.14.0a7+ (heads/main:e42bda94411, Apr 17 2025, 14:59:38) [Clang 16.0.0 (clang-1600.0.26.6)]./python.exe Lib/test/test_json/test_tool.py -h./python.exe -m json.tool --json-lines input.jsonlI/O operation on closed file.

CPython versions tested on:

3.13, 3.14, CPython main branch

Operating systems tested on:

macOS, Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixesstdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp