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
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com