Thanks for looping us in Peter. I find it hard to follow the nuances of the
discussion. If I were still developing PyPy, I would groan at the need to
support yet another new C-API with its attendant corner cases, but as a
NumPy developer I will just go with the flow and do whatever is recommended
by the CPython core team. Module initialization is not a prime pain point
of the NumPy project right now, and I hope it will not become so due to
interpreter changes. We do not currently support the stable ABI and have no
concrete plans to do so, although that may change if we wish to make a
major push to limit the number of wheels we provide.
Matti

On Thu, Oct 9, 2025 at 3:39 PM Petr Viktorin via NumPy-Discussion <
[email protected]> wrote:

> Hello,
> I'd like to hear opinions from NumPy team's (and other scientific library
> maintainers) on PEP 793: https://peps.python.org/pep-0793/
>
> What is this? I propose a new way to initialize C extension modules:
> rather than the current `PyInit_*` function, you would define
> `PyModExport_*`. Rather than returning a module object or `PyModuleDef`,
> this function would return a C array of slots (same info as in a
> `PyModuleDef`, but laid out differently).
> This change is needed to support stable ABI for free-threaded CPython
> builds without hacks. See the PEP for the rationale, and all the details.
>
> For NumPy, this means that if the plan is to support the stable ABI sooner
> than 2029 (when y'all drop support for Python 3.14), some compatibility
> code will be needed to provide both `PyInit` for 3.14 and `PyModExport` for
> newer versions. (Drafts for the compatibility code weigh in at 70-250 lines
> depending on how robustness/reusability/commented-ness.)
> For projects that don't want stable ABI for free-threaded CPython, nothing
> changes -- `PyInit_*` will continue to work.
>
> What do you think?
> Please reply here, or on the PEP's discussion thread:
> https://discuss.python.org/t/93444
>
> Thanks for your time,
> Petr
> _______________________________________________
> NumPy-Discussion mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3//lists/numpy-discussion.python.org
> Member address: [email protected]
>
_______________________________________________
NumPy-Discussion mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/numpy-discussion.python.org
Member address: [email protected]

Reply via email to