IDLE/pyclbr failures for __main__
Open
@terryjreedy is already working on this.
Since Apr 11, 2024.
topic-IDLE
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- PR merge metrics
- PR metrics pending
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.