diff --git a/src/sage/misc/cython.py b/src/sage/misc/cython.py index 93ce994c537..7590158b279 100644 --- a/src/sage/misc/cython.py +++ b/src/sage/misc/cython.py @@ -236,7 +236,7 @@ def cython(filename, verbose=0, compile_message=False, ... RuntimeError: Error compiling Cython file: ... - ...: 'sage/misc.pxd' not found + ...: 'sage/misc.pxd' not found... """ if not filename.endswith('pyx'): print("Warning: file (={}) should have extension .pyx".format(filename), file=sys.stderr) @@ -382,6 +382,12 @@ def cython(filename, verbose=0, compile_message=False, "Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.\n", "", cython_messages, 0, re.MULTILINE) + # workaround for https://github.com/sagemath/sage/issues/37560 + # triggered by Cython 3.0.9 + cython_messages = re.sub( + "^warning: .*noexcept clause is ignored for function returning Python object\n", + "", cython_messages, 0, re.MULTILINE) + sys.stderr.write(cython_messages) sys.stderr.flush()