Add PyExc_ImportCycleError and raise it when a cycle is detected

This commit is contained in:
Dino Viehland 2025-09-29 10:19:34 -07:00
parent 00e7800e4c
commit 781eedb9d4
9 changed files with 57 additions and 15 deletions

View file

@ -57,7 +57,6 @@ _PyImport_LazyImportModuleLevelObject(PyThreadState *tstate, PyObject *name, PyO
#define IMPORTS_INIT \
{ \
DLOPENFLAGS_INIT \
.lazy_import_resolution_depth = 0, \
.find_and_load = { \
.header = 1, \
}, \