[Python-Dev] PEP 3121, 384 Refactoring Issues

Brett Cannon brett at python.org
Mon Jul 14 17:41:57 CEST 2014


On Mon Jul 14 2014 at 11:27:34 AM, "Martin v. Löwis" <martin at v.loewis.de>
wrote:

> Am 12.07.14 17:19, schrieb Nick Coghlan:
> > Using the stable ABI for standard library extensions also serves to
> > decouple them further from the internal details of the CPython runtime,
> > making it more likely they will be able to run correctly on alternative
> > interpreters (since emulating or otherwise supporting the limited API is
> > easier than supporting the whole thing).
>
> There are two features to be gained for the standard library from that
>
> A. with proper module shutdown support, it will be possible to release
>    objects that are currently held in C global/static variables, as the
>    C global variables will go away. This, in turn, is a step forward in
>    the desire to allow for proper leak-free interpreter shutdown, and
>    in the desire to base interpreter shutdown on GC.
>
> B. with proper use of heap types (instead of the static type objects),
>    support for the multiple-interpreter feature will be improved, since
>    type objects will be per-interpreter, instead of being global. This,
>    in turn, is desirable since otherwise state changes can leak from
>    one interpreter to the other.
>
> So I still maintain that the change is desirable even for the standard
> library.
>

I agree for PEP  3121 which is the initialization/finalization work. The
stable ABi is not necessary. So maybe we should re-examine the patches and
accept the bits that clean up init/finalization and leave out any
ABi-related changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140714/db834303/attachment.html>


More information about the Python-Dev mailing list