Skip to content

SymPy docs build broken with Sphinx 9.0.0 #14265

@oscarbenjamin

Description

@oscarbenjamin

Describe the bug

The docs build fails with

Extension error (numpydoc)!

Versions
========

* Platform:         linux; (Linux-6.11.0-1018-azure-x86_64-with-glibc2.39)
* Python version:   3.14.2 (CPython)
* Sphinx version:   9.1.0
* Docutils version: 0.22.4
* Jinja2 version:   3.1.6
* Pygments version: 2.19.2

Last Messages
=============

    modules/polys/agca


    reading sources... [ 66%]
    modules/polys/basics


    reading sources... [ 66%]
    modules/polys/domainmatrix

Loaded Extensions
=================

* sphinx.ext.mathjax (9.1.0)
* alabaster (1.0.0)
* sphinxcontrib.applehelp (2.0.0)
* sphinxcontrib.devhelp (2.0.0)
* sphinxcontrib.htmlhelp (2.1.0)
* sphinxcontrib.serializinghtml (2.0.0)
* sphinxcontrib.qthelp (2.0.0)
* sphinx.ext.autodoc (9.1.0)
* sphinx.ext.linkcode (9.1.0)
* sphinx_math_dollar (unknown version)
* numpydoc (unknown version)
* sphinx_reredirects (unknown version)
* sphinx_copybutton (0.5.2)
* sphinx.ext.graphviz (9.1.0)
* sphinxcontrib.jquery (4.1)
* matplotlib.sphinxext.plot_directive (3.10.8)
* myst_parser (5.0.0)
* sphinx.ext.intersphinx (9.1.0)
* furo (2025.12.19)
* sphinx_basic_ng (1.0.0.beta2)

Traceback
=========

      File "/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/site-packages/sphinx/events.py", line 452, in emit
        raise ExtensionError(
        ...<3 lines>...
        ) from exc
    sphinx.errors.ExtensionError: Handler <function mangle_docstrings at 0x7fd247bb8a90> for event 'autodoc-process-docstring' threw an exception (exception: <built-in function reduce> builtin has invalid signature)


The full traceback has been saved in:
/tmp/sphinx-err-7frcgp28.log

To report this error to the developers, please open an issue at <https://github.com/sphinx-doc/sphinx/issues/>. Thanks!
Please also report this if it was a user error, so that a better error message can be provided next time.
make[1]: *** [Makefile:74: printwarnings] Error 1
make: *** [Makefile:55: html] Error 2

How to Reproduce

git clone https://github.com/sympy/sympy
cd sympy
git checkout 8bae18edfa5f7d40ece869505d7ee8fb7ba73a10
pip install -e .
pip install -r doc/requirements.txt
cd doc
make html

Environment Information

Platform:              linux; (Linux-6.8.0-65-generic-x86_64-with-glibc2.35)
Python version:        3.14.0 (main, Oct  7 2025, 15:35:21) [Clang 20.1.4 ])
Python implementation: CPython
Sphinx version:        9.1.0
Docutils version:      0.22.4
Jinja2 version:        3.1.6
Pygments version:      2.19.2

Sphinx extensions

sphinx.ext.mathjax (9.1.0)
alabaster (1.0.0)
sphinxcontrib.applehelp (2.0.0)
sphinxcontrib.devhelp (2.0.0)
sphinxcontrib.htmlhelp (2.1.0)
sphinxcontrib.serializinghtml (2.0.0)
sphinxcontrib.qthelp (2.0.0)
sphinx.ext.autodoc (9.1.0)
sphinx.ext.linkcode (9.1.0)
sphinx_math_dollar (unknown version)
numpydoc (unknown version)
sphinx_reredirects (unknown version)
sphinx_copybutton (0.5.2)
sphinx.ext.graphviz (9.1.0)
sphinxcontrib.jquery (4.1)
matplotlib.sphinxext.plot_directive (3.10.8)
myst_parser (5.0.0)
sphinx.ext.intersphinx (9.1.0)
furo (2025.12.19)
sphinx_basic_ng (1.0.0.beta2)

Additional context

This happened because a new release of MyST-Parser removed a sphinx < 9 pin so the build previously succeeded with sphinx 8.2.3 but now fails with 9.1.0.

This is the SymPy issue: sympy/sympy#28954

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions