gh-132775: Fix Interpreter.call() __main__ Visibility (gh-135595) · python/cpython@269e19e · GitHub
Skip to content

Commit 269e19e

Browse files
gh-132775: Fix Interpreter.call() __main__ Visibility (gh-135595)
As noted in the new tests, there are a few situations we must carefully accommodate for functions that get pickled during interp.call(). We do so by running the script from the main interpreter's __main__ module in a hidden module in the other interpreter. That hidden module is used as the function __globals__.
1 parent fba5dde commit 269e19e

4 files changed

Lines changed: 400 additions & 227 deletions

File tree

Lib/test/test_interpreters/test_api.py

Lines changed: 181 additions & 0 deletions

Modules/_interpretersmodule.c

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)