Implement PEP 489 - Multi-phase extension module initialization#2245
Implement PEP 489 - Multi-phase extension module initialization#2245
Conversation
|
Looks like PyPy doesn't support PEP 489. |
|
:( I guess we have to make a choice between making a new API that's not supported on PyPy, or just using different behaviour on CPython and PyPy. I think a separate API is probably better? |
|
Maybe we should feature-gate it? See also cython/cython#2343:
|
|
It would be interesting to explore. There's also still a possibility to have a That Cython thread is really interesting in general. |
But isn't "same interface but slightly incompatible behaviour" (w.r.t. CPython) already something that PyPy users expect? I fear that having CPython-only API will only end up with extensions having feature-gated PyPy-compatible code paths any way, so I would prefer it if the thankless task of trying to paper this over was centralized in PyO3 (were we could also move the ecosystem over if/when PyPy adds support for this.) |
|
I think it might depend how different the PyPy behaviour is. I do agree if we can solve the problem for users transparently, that would be nicest. |
18bc0ce to
e842c78
Compare
|
Superseded by #5142 |
https://peps.python.org/pep-0489/
This is very much WIP, opening for discussion, previously: #1982