-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
This includes any function that calls _PyEval_GetGlobals()
or _PyEval_GetFrameLocals()
. Here's a list of the ones I noticed:
globals()
locals()
dir()
vars()
exec()
eval()
For example:
from concurrent import interpreters
interp = interpreters.create()
# This raises SystemError.
interp.call(eval, 'True')
Ideally it would fall back to __main__.__dict__
for the globals and locals.
FWIW, this is most obvious with subinterpreters, but a similar problem applies to any user of the C-API that doesn't have a frame set.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
efimov-mikhail
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done