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

IDLE editor crashes opening a file with million+ character lines #103089

Open
Assignees
terryjreedy
Labels
stdlibPython modules in the Lib dirtopic-IDLEtype-bugAn unexpected behavior, bug, or error
@AlexWaygood

Description

@AlexWaygood

Bug report

IDLE crashes if you try to open a.py file with ridiculously long nested dicts in it.

To reproduce

  1. Copy and paste the contents of this file into a.py file:repro.txt
  2. Attempt to open the file with IDLE.

Observed behaviour

The first time I tried doing this, IDLE opened the file, but then immediately crashed. All subsequent times I have tried doing this, Python has hanged on me requesting IDLE to open the file. (I don't know how long it hangs for; I've interrupted it using CTRL-C every time.)

Comments

This is pretty weird code. The reason why it's so weird is that it's partially generated code: it's the result of a codemod bystubdefaulter.

IDLE is far from the only tool that crashes or hangs when encountering this code. This code also causesblack, flake8 andmypy to hang indefinitely. VSCode does open the file, and has no performance issues, but it takes a very long time for pyright's analysis of the file to complete in the background when you open the file with VSCode.

Your environment

  • CPython versions tested on:
  • Operating system and architecture: Windows

Metadata

Metadata

Assignees

Labels

stdlibPython modules in the Lib dirtopic-IDLEtype-bugAn unexpected behavior, bug, or error

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp