Re: [Python-Dev] redesigning the extension module initialisation protocol

2013-08-11 Thread Stefan Behnel
Nick Coghlan, 12.08.2013 00:41: > On 11 Aug 2013 09:55, "Stefan Behnel" wrote: > this already suggests a simple module initialisation interface. > The > extension module would expose a function that returns a module type, > and > the loader/importer would then simply instantiate

Re: [Python-Dev] redesigning the extension module initialisation protocol (was: Strange artifacts with PEP 3121 and monkey-patching sys.modules (in csv, ElementTree and others))

2013-08-11 Thread Nick Coghlan
On 11 Aug 2013 09:55, "Stefan Behnel" wrote: > > Nick Coghlan, 11.08.2013 15:19: > > On 11 Aug 2013 09:02, "Stefan Behnel" wrote: > >>> BTW, this already suggests a simple module initialisation interface. The > >>> extension module would expose a function that returns a module type, and > >>> the

Re: [Python-Dev] redesigning the extension module initialisation protocol

2013-08-11 Thread Stefan Behnel
Eli Bendersky, 11.08.2013 19:43: > Out of curiosity - can we list actual use cases for this new design? The > previous thread, admittedly, deals with an isoteric corner-cases that comes > up in overly-clever tests. If we plan to serious consider these changes - > and this appears to be worth a PEP

Re: [Python-Dev] redesigning the extension module initialisation protocol (was: Strange artifacts with PEP 3121 and monkey-patching sys.modules (in csv, ElementTree and others))

2013-08-11 Thread Eli Bendersky
On Sun, Aug 11, 2013 at 6:52 AM, Stefan Behnel wrote: > Nick Coghlan, 11.08.2013 15:19: > > On 11 Aug 2013 09:02, "Stefan Behnel" wrote: > >>> BTW, this already suggests a simple module initialisation interface. > The > >>> extension module would expose a function that returns a module type, > an

[Python-Dev] redesigning the extension module initialisation protocol (was: Strange artifacts with PEP 3121 and monkey-patching sys.modules (in csv, ElementTree and others))

2013-08-11 Thread Stefan Behnel
Nick Coghlan, 11.08.2013 15:19: > On 11 Aug 2013 09:02, "Stefan Behnel" wrote: >>> BTW, this already suggests a simple module initialisation interface. The >>> extension module would expose a function that returns a module type, and >>> the loader/importer would then simply instantiate that. Nothin