Skip to content

Commit 64a4510

Browse files
author
Matthias Koeppe
committed
src/sage/misc/cython.py: Hide Cython 3 warning with unpatched cysignals
1 parent 420e52d commit 64a4510

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/sage/misc/cython.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import builtins
2323
import os
24+
import re
2425
import sys
2526
import shutil
2627

@@ -396,6 +397,12 @@ def cython(filename, verbose=0, compile_message=False,
396397
raise RuntimeError(cython_messages.strip())
397398

398399
if verbose >= 0:
400+
# triggered by Cython 3 with unpatched cysignals 1.11.2
401+
cython_messages = re.sub(
402+
"^.*The keyword 'nogil' should appear at the end of the function signature line. "
403+
"Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.\n",
404+
"", cython_messages, 0, re.MULTILINE)
405+
399406
sys.stderr.write(cython_messages)
400407
sys.stderr.flush()
401408

0 commit comments

Comments
 (0)