Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Description
Bug report
IDLE crashes if you try to open a.py
file with ridiculously long nested dicts in it.
To reproduce
- Copy and paste the contents of this file into a
.py
file:repro.txt - 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:
- 3.11.2
- CPython
main
branch @7703def
- Operating system and architecture: Windows
Metadata
Metadata
Assignees
Projects
Status