From ed584554d0fbd6b7a929bfaec05295f918c93e90 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann <tw@waldmann-edv.de> Date: Sat, 23 Dec 2023 21:06:10 +0100 Subject: [PATCH] cython: use 3str language level (default in cython3), fixes #7978 drop support for Cython 0.29.x, use Cython 3.0.x from now on. --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 9a0343816..00048b9ac 100644 --- a/setup.py +++ b/setup.py @@ -243,9 +243,9 @@ if not on_rtd: if cythonize and cythonizing: cython_opts = dict( - # default language_level will be '3str' starting from Cython 3.0.0, - # but old cython versions (< 0.29) do not know that, thus we use 3 for now. - compiler_directives={'language_level': 3}, + # 3str is the default in Cython3 and we do not support older Cython releases. + # we only set this to avoid the related FutureWarning from Cython3. + compiler_directives={'language_level': '3str'} ) if not is_win32: # compile .pyx extensions to .c in parallel, does not work on windows