summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2025-05-30 18:28:35 (GMT)
committerGitHub <noreply@github.com>2025-05-30 18:28:35 (GMT)
commitd45d05326745fd6722d7af639eed7c1f408da426 (patch)
treea0f5f3d1fda1013601b2421cc24dca0d1b6b7cb9 /Python/import.c
parent69536093de97b52789912bf1260b395a38b42aa8 (diff)
downloadcpython-d45d05326745fd6722d7af639eed7c1f408da426.zip
cpython-d45d05326745fd6722d7af639eed7c1f408da426.tar.gz
cpython-d45d05326745fd6722d7af639eed7c1f408da426.tar.bz2
[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
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index f24c571..d67bbb7 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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 */