Message387174
I wrote _testinernalcapi.get_builtins() function to help me debuging this issue:
diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c
index ab6c5965d1..250ecc61ab 100644
--- a/Modules/_testinternalcapi.c
+++ b/Modules/_testinternalcapi.c
@@ -279,6 +279,14 @@ test_atomic_funcs(PyObject *self, PyObject *Py_UNUSED(args))
}
+static PyObject*
+get_builtins(PyObject *self, PyObject *obj)
+{
+ PyFunctionObject *func = (PyFunctionObject *)obj;
+ return Py_NewRef(func->func_builtins);
+}
+
+
static PyMethodDef TestMethods[] = {
{"get_configs", get_configs, METH_NOARGS},
{"get_recursion_depth", get_recursion_depth, METH_NOARGS},
@@ -289,6 +297,7 @@ static PyMethodDef TestMethods[] = {
{"get_config", test_get_config, METH_NOARGS},
{"set_config", test_set_config, METH_O},
{"test_atomic_funcs", test_atomic_funcs, METH_NOARGS},
+ {"get_builtins", get_builtins, METH_O},
{NULL, NULL} /* sentinel */
}; |
|
Date |
User |
Action |
Args |
2021-02-17 17:47:07 | vstinner | set | recipients:
+ vstinner, Mark.Shannon, frenzy, pablogsal |
2021-02-17 17:47:07 | vstinner | set | messageid: <1613584027.97.0.564421766111.issue43228@roundup.psfhosted.org> |
2021-02-17 17:47:07 | vstinner | link | issue43228 messages |
2021-02-17 17:47:07 | vstinner | create | |
|