[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? > >

[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 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 Petr Viktorin
On 23. 08. 22 16:19, Sebastian Berg wrote: On Tue, 2022-08-23 at 14:00 +0200, Petr Viktorin wrote: On 23. 08. 22 11:46, Sebastian Berg wrote: [snip] One thing that I am not clear about are e.g. creation functions. They are public C-API so they have no way of getting a "self" or type/module pas

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

2022-08-23 Thread Sebastian Berg
On Tue, 2022-08-23 at 14:00 +0200, Petr Viktorin wrote: > On 23. 08. 22 11:46, Sebastian Berg wrote: > > On Tue, 2022-08-23 at 03:16 +0300, Matti Picus wrote: > > > > > > On 22/8/22 18:59, Eric Snow wrote: > > > > Hi all, > > > > > > > > > > > > > > devs than just me.  Do you have any preferen

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

2022-08-23 Thread Petr Viktorin
On 23. 08. 22 11:46, Sebastian Berg wrote: On Tue, 2022-08-23 at 03:16 +0300, Matti Picus wrote: On 22/8/22 18:59, Eric Snow wrote: Hi all, devs than just me.  Do you have any preference for or against any particular venue? Thanks! -eric ___

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

2022-08-23 Thread Sebastian Berg
On Tue, 2022-08-23 at 03:16 +0300, Matti Picus wrote: > > On 22/8/22 18:59, Eric Snow wrote: > > Hi all, > > > > devs than just me.  Do you have any preference for or against any > > particular venue? > > > > Thanks! > > > > -eric > > ___ > > NumPy

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

2022-08-23 Thread Petr Viktorin
On 23. 08. 22 10:02, Matti Picus wrote: On 23/8/22 03:16, Matti Picus wrote: ... One thing CPython could do is to provide clear documentation how to port a small c-extension module [1] Matti [1] https://github.com/python/cpython/issues/79601 I should have searched the documentation,

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

2022-08-23 Thread Matti Picus
On 23/8/22 03:16, Matti Picus wrote: ... One thing CPython could do is to provide clear documentation how to port a small c-extension module [1] Matti [1] https://github.com/python/cpython/issues/79601 I should have searched the documentation, there is now a quite extensive guide [2]

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

2022-08-22 Thread Matti Picus
On 22/8/22 18:59, Eric Snow wrote: 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