<p dir="ltr">On 16 Apr 2015 07:05, "Petr Viktorin" <<a href="mailto:encukou@gmail.com">encukou@gmail.com</a>> wrote:<br>
><br>
> Hello,<br>
> Based on previous discussions, I've just sent a rewritten version of<br>
> PEP 489 to the PEP editors. I'm including a copy below.</p>
<p dir="ltr">I like the general approach described in this version of the PEP.</p>
<p dir="ltr">> There's a question I need help with: go with a new PyModuleDesc<br>
> structure, or stick with PyModuleDef and repurpose a currently unused<br>
> member. You can find the details in the text itself.</p>
<p dir="ltr">I think the PEP makes a decent case for:</p>
<p dir="ltr">* m_reload being an essentially unimplementable idea<br>
* swapping it out for a slots array pointer being a way to migrate to an extensible approach to module declarations without needing a new struct definition in the C API (and associated new functions to work with that struct).</p>
<p dir="ltr">That means I'm inclined to favour the "modify PyModuleDef" variant.</p>
<p dir="ltr">> A wart I added is "singleton modules", necessary for<br>
> "PyState_FindModule"-like functionality. I wouldn't mind not including<br>
> this, but it would mean the new API can't replace all use cases of the<br>
> old PyInit_.</p>
<p dir="ltr">I think the "wrapping a C library with global state" case is worth being able to declare explicitly.</p>
<p dir="ltr">Cheers,<br>
Nick.</p>