-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement PEP 489 - Multi-phase extension module initialization #2245
base: main
Are you sure you want to change the base?
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
https://peps.python.org/pep-0489/
This is very much WIP, opening for discussion, previously: #1982