Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
Closed
Labels
3.12only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-importlibtopic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
The first time a subinterpreter attempts to import a module without proper subinterpreter support, an ImportError is raised (which is correct). However, subsequent imports of the same module succeed!
Using readline as an example, since it's currently single-phase init:
>>>from_xxsubinterpretersimportcreate, run_string>>>s="import readline; print(readline)">>>interp=create() >>>run_string(interp, s) Traceback (mostrecentcalllast): File"<stdin>", line1, in<module>_xxsubinterpreters.RunFailedError:<class'ImportError'>: modulereadlinedoesnotsupportloadinginsubinterpreters>>>run_string(interp, s) <module'readline'>Linked PRs
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-importlibtopic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done