[Python-Dev] Pre-PEP: Redesigning extension modules (original) (raw)

Stefan Behnel stefan_ml at behnel.de
Sun Sep 8 09:09:05 CEST 2013


Eric Snow, 08.09.2013 00:22:

On Mon, Sep 2, 2013 at 7:02 AM, Nick Coghlan wrote:

The hook API I currently have in mind is a two step initialisation:

PyImportPrepareNAME (optional) PyImportExecNAME Should we also look at an API change for the initfunc() of PyImportInittab entries? Currently the function takes a module name, which doesn't jive with loader.execmodule() taking a module. I noticed this while adding an execmodule() to BuiltinImporter. I suppose the same thing goes for PyImportImportFrozenModuleObject().

Is it still the case that the inittab mechanism only works for the embedding case? It would be nice to have a declarative mechanism for registering a set of modules from a running module init function.

Stefan



More information about the Python-Dev mailing list