You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SubTracker: Convert static types (PyTypeObject) to heap types via PyType_FromModuleAndSpec #32747
Part of #32451 and #31913. This is intended to be a tracking issue for a series of PRs converting NumPy's static types to heap types.
NumPy currently defines its types (ndarray, dtype, ufunc, scalars, iterators, etc.) as static PyTypeObjects. Static types are shared by every interpreter in the process, including their tp_dict and reference counts, so they can't be isolated per interpreter. The CPython Isolating Extension Modules guide recommends replacing them with heap types created by PyType_FromModuleAndSpec.
Converting to heap types is also a prerequisite for building against the Limited API, where static PyTypeObject definitions are not possible, see #31913.
Activity
mattip commentedon Sep 22, 2026
@Abdellox this is part of a larger effort by @prathamhole14. Any extra help at this point would not be helpful.
da-woods commentedon Sep 23, 2026
Just a quick note that I have an existing PR to do this for f2py so no need to duplicate that.
I suspect you weren't planning to cover f2py in this effort though