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

Petr Viktorin report at bugs.python.org
Tue Sep 21 04:43:17 EDT 2021


Petr Viktorin <encukou at gmail.com> added the comment:

Subinterpreters are not the only reason to do this (and they're not *my* reason to do it).

Adding a way to create PyStructSequence heap will help users of the stable ABI, where reduced performance is a known tradeoff (see https://www.python.org/dev/peps/pep-0652/#stable-abi: "The Stable ABI trades performance for its stability").
More generally, this would need solving one of the remaining limitations of the limited API (PEPs 489, 630): type-specific data. If Hai Shi solves the problem, the solution will be useful even if PyStructSequence_FromModuleAndDesc turns out useless. 

Using the proposed new API in CPython's stdlib should be done much more deliberately, and yes, would need a PEP.

----------

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


More information about the Python-bugs-list mailing list