Re: PEP 489: Redesigning extension module loading
Nick Coghlan <[email protected]> Thu, 16 Apr 2015 16:48:11 -0400
| Newsgroups | gmane.comp.python.import |
|---|---|
| Message-ID | <CADiSq7fSbWbo-fYHayr=XtHGHbkVPVShJ06uEmsAD21Y8B5LXQ@mail.gmail.com> |
On 16 Apr 2015 07:05, "Petr Viktorin" <[email protected]> wrote: > > Hello, > Based on previous discussions, I've just sent a rewritten version of > PEP 489 to the PEP editors. I'm including a copy below. I like the general approach described in this version of the PEP. > There's a question I need help with: go with a new PyModuleDesc > structure, or stick with PyModuleDef and repurpose a currently unused > member. You can find the details in the text itself. I think the PEP makes a decent case for: * m_reload being an essentially unimplementable idea * 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). That means I'm inclined to favour the "modify PyModuleDef" variant. > A wart I added is "singleton modules", necessary for > "PyState_FindModule"-like functionality. I wouldn't mind not including > this, but it would mean the new API can't replace all use cases of the > old PyInit_. I think the "wrapping a C library with global state" case is worth being able to declare explicitly. Cheers, Nick. _______________________________________________ Import-SIG mailing list [email protected] https://mail.python.org/mailman/listinfo/import-sig