[Python-Dev] PEP 489: module m_traverse called with NULL module state
Antoine Pitrou
solipsis at pitrou.net
Thu Dec 14 09:11:11 EST 2017
On Thu, 14 Dec 2017 15:05:02 +0100
Petr Viktorin <encukou at gmail.com> 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_GetState() and other APIs directly.
> However, I'd like to avoid solving subinterpreter support separately
> (and slightly differently) in each module.
My question is: can you get multi-interpreter support *without* PEP
489? That is, using single-phase initialization and
PyModule_GetState().
> For a slightly bigger picture: as a part-time internship, Marcel is
> identifying where PEP 489 is inadequate, and solving the problems for
> the complex cases.
Is Marcel mentored by anyone in particular?
> I'm assuming fixing the atexit bug from 2009 [0] can be delayed a bit as
> issues with PEP 489 are investigated & solved.
> Does that sound fair?
Probably, but the atexit bug deserves fixing in itself. If a fix is
ready, it would be a pity not to let it in.
Regards
Antoine.
More information about the Python-Dev
mailing list