Re: [Python-Dev] PEP 489: module m_traverse called with NULL module state

2017-12-19 Thread Petr Viktorin
On 12/19/2017 04:19 PM, Antoine Pitrou wrote: On Tue, 19 Dec 2017 16:10:06 +0100 Petr Viktorin wrote: Speaking of which, the doc is not very clear: is PEP 489 required for multi-interpreter support or is PyModule_GetState() sufficient? Yes, it is possible to have proper subinterpreter suppor

Re: [Python-Dev] PEP 489: module m_traverse called with NULL module state

2017-12-19 Thread Antoine Pitrou
On Tue, 19 Dec 2017 16:10:06 +0100 Petr Viktorin wrote: > > > > Speaking of which, the doc is not very clear: is PEP 489 required for > > multi-interpreter support or is PyModule_GetState() sufficient? > > Yes, it is possible to have proper subinterpreter support without > multi-phase init. Th

Re: [Python-Dev] PEP 489: module m_traverse called with NULL module state

2017-12-19 Thread Petr Viktorin
On Thu, Dec 14, 2017 at 12:00 PM, Antoine Pitrou wrote: > On Thu, 14 Dec 2017 17:00:10 +1000 > Nick Coghlan wrote: >> On 14 Dec. 2017 9:19 am, "Antoine Pitrou" wrote: >> >> >> Hello, >> >> After debugging a crash on AppVeyor for a submitter's PR >> (see https://github.com/python/cpython/pull/461

Re: [Python-Dev] PEP 489: module m_traverse called with NULL module state

2017-12-14 Thread Antoine Pitrou
On Thu, 14 Dec 2017 15:05:02 +0100 Petr Viktorin wrote: > > PEP 489 gives you good defaults, if you use it and avoid global state > (roughly: C-level mutable static variables), then you should get > multi-interpreter support for free in simple cases. > It's also possible to use PyModule_GetStat

Re: [Python-Dev] PEP 489: module m_traverse called with NULL module state

2017-12-14 Thread Petr Viktorin
On 12/14/2017 12:00 PM, Antoine Pitrou wrote: On Thu, 14 Dec 2017 17:00:10 +1000 Nick Coghlan wrote: On 14 Dec. 2017 9:19 am, "Antoine Pitrou" wrote: Hello, After debugging a crash on AppVeyor for a submitter's PR (see https://github.com/python/cpython/pull/4611 ), I came to the following d

Re: [Python-Dev] PEP 489: module m_traverse called with NULL module state

2017-12-14 Thread Antoine Pitrou
On Thu, 14 Dec 2017 17:00:10 +1000 Nick Coghlan wrote: > On 14 Dec. 2017 9:19 am, "Antoine Pitrou" wrote: > > > Hello, > > After debugging a crash on AppVeyor for a submitter's PR > (see https://github.com/python/cpython/pull/4611 ), I came to the > following diagnosis: converting the "atexit"

Re: [Python-Dev] PEP 489: module m_traverse called with NULL module state

2017-12-13 Thread Nick Coghlan
On 14 Dec. 2017 9:19 am, "Antoine Pitrou" wrote: Hello, After debugging a crash on AppVeyor for a submitter's PR (see https://github.com/python/cpython/pull/4611 ), I came to the following diagnosis: converting the "atexit" module (which is a built-in C extension) to PEP 489 multiphase initiali