On Tue, 21 Apr 2020 at 15:31, Eric Snow
Here are the options for handling non-compliant extension modules:
1. do nothing (extensions may break in ways that are hard for users to deal with) 2. raise ImportError if an extension without PEP 489 support is imported in a subinterpreter 3. add a per-interpreter isolated mode (default) that provides the behavior of #2, where non-isolated gives #1
At this point my plan was go with #2, to avoid giving extension authors the pain that comes with #1. If we went with #3, at least during the provisional phase, it would allow extension authors to try out their extensions in subinterpreters.
This seems sensible to me - #2 ensures that we don't get weird bugs from users trying things that we know they shouldn't be doing. I'm not sure how much advantage #3 would have, presumably extension authors wanting to "try out" subinterpreters would at some point have to mark them as importable as per #2, so why not just do that much and then see what else needs changing? But I don't know the C API for subinterpreters, so maybe there are complexities I don't understand, in which case having #3 probably makes more sense in that context. Paul