Skip to content

DOC: update sphinx and numpydoc pins #30684

Open

Description

@ngoldbaum

Currently sphinx and numpydoc are pinned to old versions in the requirements file:

sphinx==7.2.6
numpydoc==1.4

Numpydoc 1.4 is from 2022 and Sphinx 7.2.6 is from 2023.

It would behoove us to update these to the current versions so our documentation build configuration doesn't hopelessly bitrot.

I tried updating these pins in #30683 but punted when the update proved nontrivial. The build does succeed, but with more than a thousand warnings: https://gist.github.com/ngoldbaum/ad5e476401a591d378df406e2bcfaada

#28694 is related too - that's using a sphinx version newer than our pin.

Activity

  1. added this to the 2.5.0 Release milestone on Jan 21, 2026
  2. shiragemalashri-shri commented on Feb 6, 2026

    @shiragemalashri-shri

    Hi, I’d like to work on this issue if it’s still available.
    I will locate the incorrect indentation, fix it, and ensure
    the documentation builds correctly. Please let me know if this
    approach is fine. Thanks!

  3. added
    sustain-2026Issues reserved for NumFOCUS Sustaining Open Source Series 2026
    on Sep 13, 2026
  4. moved this from In Progress to Looking for Contributor in NF Sustaining Open Source Series 2026on Sep 13, 2026
  5. AbhiRKeesara commented on Sep 25, 2026

    @AbhiRKeesara
    Contributor

    Hi Team,

    Seems numpydoc is updated to latest version 1.11.0 with this #32699 PR. I'll try to get Sphinx to latest version 9.1.0 to close out this issue.

    Thanks!

  6. AbhiRKeesara commented on Sep 25, 2026

    @AbhiRKeesara
    Contributor

    Hi Team,

    I investigated updating the sphinx pin from 8.2.3 to 9.1.0.

    sphinx 9.1.0 has an upstream regression that breaks the NumPy docs build. It produces about 357 warnings like:

    WARNING: error while formatting signature for numpy.add: list assignment index out of range [autodoc]
    

    This affects all ufuncs (C extension types). The bug is in Sphinx 9's rewritten autodoc. It assumes the signatures list is non-empty, but for C extensions where numpydoc provides the signature via hook, the list starts empty.

    Setting autodoc_use_legacy_class_based = True (the official workaround per sphinx-doc/sphinx#14089) only reduces warnings from 586 to 451. The remaining 224 come from autosummary, which bypasses the legacy flag.

    I reported the specific bug to sphinx-doc/sphinx#14089. Seems like this issue has to be parked until then.

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions