[Python-Dev] Pre-PEP: Redesigning extension modules

Antoine Pitrou solipsis at pitrou.net
Fri Sep 6 07:43:48 CEST 2013


On Thu, 5 Sep 2013 23:26:31 -0600
Eric Snow <ericsnowcurrently at gmail.com> wrote:
> On Sat, Aug 24, 2013 at 7:07 AM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> 
> > PEP 3121 would no longer be necessary. Extension types can do all we need.
> > No more special casing of modules, that was the idea.
> >
> 
> One nice thing about PEP 3121 is the addition of md_state to module objects
> to store internal module state.  Wouldn't we be better served by improving
> the related API rather than abandoning it?

md_state isn't a PyObject and therefore its lifetime management is
quirky (as Py_buffer, same bad idea). So I'd be happy for it to
disappear from the next API.

> This, coupled with the PEP 451-compatible API and with a proxying wrapper,
> would go a long way to various "reloading" issues that extension modules
> have.

Proxying wrapper? We shouldn't need that kind of tricks.

Regards

Antoine.




More information about the Python-Dev mailing list