[3.14] gh-132775: Expand the Capability of Interpreter.call() (gh-134933)

It now supports most callables, full args, and return values.

(cherry picked from commit 52deabe, AKA gh-133484)

Co-authored-by: Eric Snow ericsnowcurrently@gmail.com
This commit is contained in:
Miss Islington (bot) 2025-05-30 20:28:35 +02:00 committed by GitHub
parent 69536093de
commit d45d053267
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 32773 additions and 31776 deletions

View file

@ -3962,8 +3962,10 @@ PyImport_Import(PyObject *module_name)
if (globals != NULL) {
Py_INCREF(globals);
builtins = PyObject_GetItem(globals, &_Py_ID(__builtins__));
if (builtins == NULL)
if (builtins == NULL) {
// XXX Fall back to interp->builtins or sys.modules['builtins']?
goto err;
}
}
else {
/* No globals -- use standard builtins, and fake globals */