Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Description
In all of 3.10.11+, 3.11.3+, and 3.12.0a7+ (locally compiled) in a newly started REPLimport importlib; importlib.util
fails with AttributeError. In a freshly started IDLE Shell, the same statement succeeds. This is because IDLE imports importlib.util and leaves the name 'util' in importlib when starting the usercode execution subprocess. I consider this a bug as it makes user code run during development in IDLE even though it will fail when run directly, without IDLE. This is a similar issue to#69693 for tkinter.font.
I checked other things withfor name in sorted(sys.modules.keys()): print(name)
Submodules present on python startup should remain present after IDLE run startup
importlib.machinery is perhaps a bug. Any fix will carry over to IDLE.
encodings.codecs are like intentional.
idlelib itself has one attribute,testing
. Document if not already.
import idlelib in idlelib gives access to many submodules. Doc that subject to change, don't depend on it. Instead import idlelib.module.
Following should not be touched:
import collections imports abc. Believe intentional.
import tkinter imports constants. Intentional?
import typing imports io, re. Intentional?
import re imports few ._xxxs
Following are either from other non-IDLE stdlib modules that IDLE imports or from other IDLE modules. At least fix latter.
import urllib does not import parse
import xml imports nothing else.
Issue inspired byimportlib discussion. David Ellis said that importlib.machinery in REPL is from rlcompleter. (True on Windows?) and that importlib.util may be from sphinx or site. For IDLE run, it should not matter if run from editor.
Metadata
Metadata
Assignees
Projects
Status