Bug report
Bug description:
I am looking at updating PyO3 to use PyModule_FromSlotsAndSpec to initialize modules embedded in binaries using PyImport_AppendToInittab.
I can successfully create the module as part of the initfunc, however the loader then fails on the following check:
|
res.def = _PyModule_GetDefOrNull(m); |
|
if (res.def == NULL) { |
|
PyErr_Clear(); |
|
_Py_ext_module_loader_result_set_error( |
|
&res, _Py_ext_module_loader_result_ERR_MISSING_DEF); |
|
goto error; |
|
} |
This check is guaranteed to fail, as modules created from slots do not have a PyModuleDef.
CPython versions tested on:
3.15
Operating systems tested on:
macOS
Bug report
Bug description:
I am looking at updating PyO3 to use
PyModule_FromSlotsAndSpecto initialize modules embedded in binaries usingPyImport_AppendToInittab.I can successfully create the module as part of the
initfunc, however the loader then fails on the following check:cpython/Python/importdl.c
Lines 506 to 512 in f5119a5
This check is guaranteed to fail, as modules created from slots do not have a
PyModuleDef.CPython versions tested on:
3.15
Operating systems tested on:
macOS