# PEP 793 – PyModExport: A new entry point for C extension modules

**URL:** <https://discuss.python.org/t/pep-793-pymodexport-a-new-entry-point-for-c-extension-modules/93444>\
**Category:** PEPs\
**Created:** [May 27, 2025, 4:55am UTC](https://discuss.python.org/t/pep-793-pymodexport-a-new-entry-point-for-c-extension-modules/93444 "2025-05-27T04:55:15Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![encukou](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/encukou/32/2461_2.png) [@encukou](https://discuss.python.org/u/encukou)\
**Post date:** [May 27, 2025, 2:22pm UTC](https://discuss.python.org/t/pep-793-pymodexport-a-new-entry-point-for-c-extension-modules/93444/8 "2025-05-27T14:22:31Z")

</div>

Let’s discuss all that, but I consider it out of scope here.  
This is not the “entrypoint API changes I’d like in 3.15” PEP. It’s compatible with [my planned next steps](https://discuss.python.org/t/86458); I believe it’s compatible enough with yours; and I believe it’ll be a net benefit even if ($DEITY forbid) none of the next steps make it.

> [@steve.dower](#):
>
> a copy-pasteable implementation of the current entrypoint […] (copy-pasteable so that Cython and friends can copy-paste it - separately distributed is less useful here, IMHO)

Trouble is, I think Cython is better off generating both versions directly, rather than using a generic C macro that covers all the bases.  
(I do have [ideas](https://discuss.python.org/t/78873) for a more autogeneration-friendly format, but that’s for a whole different PEP.)

> [@steve.dower](#):
>
> a hard deprecation/disablement deadline for the existing API. […] let’s be noisy and actually remove the old one (at least single-phase, but ideally both it sounds like) as quickly as we can.

Deprecating only single-phase init feels off-topic for this PEP, and has [its own discussion thread](https://discuss.python.org/t/proposal-officially-deprecate-support-for-legacy-single-phase-init-extension-modules/89262).  
Deprecating the current multi-phase can’t quite begin for 5 years at the _very_ least – when the new API will be supported by non-EOL versions of Python. And after those years, any deadline we set _now_ is likely to just be discussed all over again. I guess we can set a timer now to start that discussion.  
I’d rather discuss deprecations/removals in the stable ABI in general – we obviously need to break PEP 384’s “until Python 4” promise, and that alone feels like a vat of worms.

---

_[View the full topic](https://discuss.python.org/t/pep-793-pymodexport-a-new-entry-point-for-c-extension-modules/93444)._
