Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/sage/misc/cython.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()

Expand Down