Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
Closed
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:
fromconcurrentimportinterpretersinterp=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
Metadata
Metadata
Assignees
Labels
Projects
Status
Done