mirror of
https://github.com/python/cpython.git
synced 2026-04-18 18:01:02 +00:00
For several builtin functions, we now fall back to __main__.__dict__ for the globals
when there is no current frame and _PyInterpreterState_IsRunningMain() returns
true. This allows those functions to be run with Interpreter.call().
The affected builtins:
* exec()
* eval()
* globals()
* locals()
* vars()
* dir()
We take a similar approach with "stateless" functions, which don't use any
global variables.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| test_api.py | ||
| test_channels.py | ||
| test_lifecycle.py | ||
| test_queues.py | ||
| test_stress.py | ||
| utils.py | ||