On Tue, Apr 21, 2020 at 4:11 AM Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
On 21/04/20 8:34 pm, Ronald Oussoren via Python-Dev wrote:
As far as I understand proper support for subinterpreters also requires moving away from static type definition to avoid sharing objects > between interpreters (that is, use the PyType_FromSpec to build types).
Which means updating every extension module that defines its own Python types and was written before PyType_FromSpec existed. I expect there is a huge number of those.
Correct. Before we make the GIL per-interpreter, we will need to find a solution for things like static types which minimizes the impact on extension authors. Note that PyType_FromSpec does not have to be involved. It is part of the Stable ABI effort in PEP 384, though it does help with subinterpreters. I expect there are other solutions which will not involve as much churn, though I know folks who would want everyone to use heap types regardless. :) -eric