diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 7726ccc979d..9dc6e3f3112 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -2348,7 +2348,7 @@ static PyStatus add_main_module(PyInterpreterState *interp) { PyObject *m, *d, *ann_dict; - m = PyImport_AddModule("__main__"); + m = PyImport_AddModuleObject(&_Py_ID(__main__)); if (m == NULL) return _PyStatus_ERR("can't create __main__ module");