Hm... So maybe the issue is either with Cython's default settings (perhaps
traditionally it defaults to "as fast as possible but relies on internal
APIs a lot"?) or with the Cython settings selected by default by projects
*using* Cython?

I wonder if a solution during CPython's rocky alpha release cycle could be
to default (either in Cython or in projects using it) to the "not quite as
fast but not relying on a lot of internal APIs" mode, and to switch to
Cython's faster mode only once (a) beta is entered and (b) Cython has been
fixed to work with that beta?

Sure, occasionally things still change during beta, but the point of beta
is that things shouldn't change unless it is to fix bugs. On behalf of the
Faster CPython project I can commit to that for our contributions, we'll do
our advanced work on the 3.12 branch once 3.11beta has started.

All this is assuming that Cython's default can be adjusted independently
for CPython's upcoming release (3.11, for now) and separately for previous
releases (3.10 and before). But if it can't yet, surely *that* would be a
relatively simple change?

On Tue, Feb 1, 2022 at 3:07 PM <dw-...@d-woods.co.uk> wrote:

> 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/
>


-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________
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/FUA5JDEN6374FDOZQWPZYHXH5E3U4V24/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to