[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated
STINNER Victor
report at bugs.python.org
Mon Mar 16 09:35:45 EDT 2020
STINNER Victor <vstinner at python.org> added the comment:
I updated PR 18738 to document the incompatible change in What's New In Python 3.9. Sadly, I expect that almost no third-party extension module implement the PEP 489 yet. So I expect that little or no third-party code is impacted in pratice.
> the module slots are then only needed if the module state actually gets populated, so we can safely skip them if it never even gets allocated
That's also my understanding.
> custom module subclasses should clean up like any other class instance
That sounds like a reasonable compromise to me.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39824>
_______________________________________
More information about the Python-bugs-list
mailing list