Skip to content

IDLE/pyclbr failures for __main__ #117743

Open
@terryjreedy

Description

@terryjreedy

Bug report

This discuss post says that IDLE's module browser, which uses pyclrb, fails if the file name is __main__, the filename has a '.', or the file has a syntax error. The first is the fault of of importlib.util._find_spec_from_path('main') failing (##117742). I need to verify the second. The third is a result of switching from custom parsing code that passed over syntax errors to ast.parse which does not -- and not noticing the possibility of exceptions and taking them into account. Since IDLE seems to hang, it is not clear where, and whether IDLE gets the exception.

Metadata

Metadata

Assignees

Labels

topic-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