YuanchengJiang · GitHub

Crash report

What happened?

import builtins
import sys
def test_import(name, *args, **kwargs):
    sys.modules[name] = object()
    return sys.modules[name]
builtins.__import__ = test_import
raise RuntimeError("Test")
python: ../Objects/call.c:618: PyObject *callmethod(PyThreadState *, PyObject *, const char *, struct __va_list_tag *): Assertion `callable != NULL' failed.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

No response

Linked PRs

Read the original on github.com ↗