cpython/Lib/test/test_interpreters
Eric Snow a450a0ddec
gh-135443: Sometimes Fall Back to __main__.__dict__ For Globals (gh-135491)
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.
2025-06-16 17:34:19 -06:00
..
__init__.py gh-117953: Skip test_interpreters properly without GIL (#120689) 2024-06-18 15:22:24 +00:00
__main__.py Fix trivial typo in test_interpreters (GH-113381) 2023-12-23 14:10:41 +00:00
test_api.py gh-135443: Sometimes Fall Back to __main__.__dict__ For Globals (gh-135491) 2025-06-16 17:34:19 -06:00
test_channels.py gh-134939: Add the concurrent.interpreters Module (gh-133958) 2025-06-11 17:35:48 -06:00
test_lifecycle.py gh-134939: Add the concurrent.interpreters Module (gh-133958) 2025-06-11 17:35:48 -06:00
test_queues.py gh-134939: Add the concurrent.interpreters Module (gh-133958) 2025-06-11 17:35:48 -06:00
test_stress.py gh-134939: Add the concurrent.interpreters Module (gh-133958) 2025-06-11 17:35:48 -06:00
utils.py gh-134939: Add the concurrent.interpreters Module (gh-133958) 2025-06-11 17:35:48 -06:00