13 Sep
2019
13 Sep
'19
3:58 p.m.
Hello, Currently it's not necessary to call PyState_AddModule in a module PyInit_* function. For single-phase init modules, Python calls it automatically. However, documentation of PyState_FindModule sugests that you need to call PyState_AddModule.
I wrote what I think is the expected behavior in PR 16101, but I'm not sure that's actually it. If anyone who knows the original intent is reading this, could you chime in? :)