Greg Ewing wrote:
> To address this there could be an option to choose between
> "compatible code" and "fast code", with the former restricting
> itself to the stable API.

To some extent, that exists at the moment - many of the real abuses of the 
CPython internals can be controlled by setting C defines. For the particular 
feature that caused this discussion the majority of the uses can be turned off 
by defining CYTHON_USE_EXC_INFO_STACK=0 and CYTHON_FAST_THREAD_STATE=0. 
(There's still a few uses relating to coroutines, but those too flags are 
sufficient to get Cython to build itself and Numpy on Python 3.11a4).

Obviously it could still be better. But the desire to support PyPy (and the 
beginnings of the limited API) mean that Cython does actually have alternate 
"clean" code-paths for a lot of cases.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/Q3IQUKU35GNCUXBCK55JZ3B42LSVS2M2/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to