Skip to content

Python IDLE context "Edit with IDLE" fails if there is a threading.py in the same folder #103967

Closed as not planned
@xqt

Description

@xqt

Bug report

Steps to replicate the issue:

Add a threading.py script (which may be empty). Right-click the script with context menu "Edit with IDLE".
Try to open another Python script which resides in the same folder in that way.

What happens?:
No file can be opened with IDLE context menu but a __pycache__ was created with a compiled threading Python file in both cases.
When removing the threading.py the IDLE context menu works again.

What should have happened instead?:
The threading.py should not be compiled but the selected script should be opened.

Your environment

  • CPython versions tested on: //Python: 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]//
  • Operating system and architecture: //Microsoft Windows [Version 10.0.17763.1577]//

It also fails for Python 3.12a7 and I guess for 3.10 but I believe it worked for Python 3.9 and below.
Enclosed the compiled file for an empty threading.py:
pycache.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions