[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

STINNER Victor report at bugs.python.org
Thu Jan 27 20:52:10 EST 2022


STINNER Victor <vstinner at python.org> added the comment:

Raymond:
> Is the subinterpreters work still on hold pending a PEP?

While sub-interpreters is one motivation to convert static types to heap types, it's not the only one.

IMO it's better to use the "embedded Python" use case to justify these changes, since embedding Python is non controversial and is already widely used.

For me, another motivation (related to embedded Python) is to release all memory in Py_Finalized(): see bpo-1635741. While this main issues is now closed, Python still leaks memory when you import C extensions using static types: see bpo-40077.

--

Hai Shi proposed to add a PyStructSequence_FromModuleAndDesc() function but right now, I'm not sure which C extension requires to retrieve a module state from a structseq object. Usually, structseq types have no method. So I don't see the need to reopen the issue.

I just wanted to comment this closed issue ;-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________


More information about the Python-bugs-list mailing list