[Python-Dev] PEP 554 v4 (new interpreters module)
Petr Viktorin
encukou at gmail.com
Wed Dec 6 01:20:36 EST 2017
On 12/06/2017 03:51 AM, Eric Snow wrote:
> Hi all,
>
> I've finally updated PEP 554. Feedback would be most welcome. The
> PEP is in a pretty good place now and I hope to we're close to a
> decision to accept it. :)
[...]
> C-extension opt-in/opt-out
> --------------------------
>
> By using the ``PyModuleDef_Slot`` introduced by PEP 489, we could easily
> add a mechanism by which C-extension modules could opt out of support
> for subinterpreters. Then the import machinery, when operating in
> a subinterpreter, would need to check the module for support. It would
> raise an ImportError if unsupported. >
> Alternately we could support opting in to subinterpreter support.
> However, that would probably exclude many more modules (unnecessarily)
> than the opt-out approach.
Currently it's already opt-in, as modules that use PyModuleDef are
expected to support subinterpreters:
https://www.python.org/dev/peps/pep-0489/#subinterpreters-and-interpreter-reloading
[...]
> .. [global-atexit]
> https://bugs.python.org/issue6531
Oh dear; there's now also https://bugs.python.org/issue31901
More information about the Python-Dev
mailing list