-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Subinterpreters can load modules without subinterpreter support #104621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
3.12
only security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-importlib
topic-subinterpreters
type-bug
An unexpected behavior, bug, or error
Comments
I got crashed while I executed the following script on my macOS. from _xxsubinterpreters import create, run_string
s = "import readline; print(readline)"
interp = create()
try:
run_string(interp, s)
except Exception as e:
pass
run_string(interp, s) |
FYI, it turns out we were not doing the check properly for builtin modules. |
ericsnowcurrently
added a commit
that referenced
this issue
Jul 27, 2023
…() (gh-107184) This fixes a bug where incompatible modules could still be imported if attempted multiple times.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 27, 2023
…ension() (pythongh-107184) This fixes a bug where incompatible modules could still be imported if attempted multiple times. (cherry picked from commit 75c974f) Co-authored-by: Eric Snow <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.12
only security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-importlib
topic-subinterpreters
type-bug
An unexpected behavior, bug, or error
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:Linked PRs
The text was updated successfully, but these errors were encountered: