[Numpy-discussion] Support for Multiple Interpreters (Subinterpreters) in numpy

2022-08-22 Thread Eric Snow
Hi all, CPython has supported multiple interpreters (in the same process) for a long time, but only through the C-API. I'm working on exposing that functionality to Python code (see PEP 554), aiming for 3.12. I expect that users will find the feature useful (particularly with a per-interpreter G

[Numpy-discussion] Re: Support for Multiple Interpreters (Subinterpreters) in numpy

2022-08-24 Thread Eric Snow
On Tue, Aug 23, 2022 at 3:47 AM Sebastian Berg wrote: > What is the status of immortality? None of these seem forbidding on > first sight, so long that we can get the state everywhere. > Having immortal object seems convenient, but probably not particularly > necessary. The current proposal for

[Numpy-discussion] Re: Support for Multiple Interpreters (Subinterpreters) in numpy

2022-08-24 Thread Eric Snow
On Tue, Aug 23, 2022 at 6:01 AM Petr Viktorin wrote: > And if the CPython API is lacking, it would be best to solve that in > CPython. +1 In some ways, new CPython APIs would be the most important artifacts of this discussion. We want to minimize the effort it takes to support multiple interpre

[Numpy-discussion] Re: Support for Multiple Interpreters (Subinterpreters) in numpy

2022-08-24 Thread Eric Snow
On Wed, Aug 24, 2022 at 4:42 AM Petr Viktorin wrote: > On 23. 08. 22 16:19, Sebastian Berg wrote: > > Our public C-API is currently exported as a single static struct into > > the library loading NumPy. If types depend on the interpreter, it > > would seem we need to redo the whole mechanism? > >