Skip to content

Use sphinx.util.inspect.Signature not sphinx.ext.autodoc.inspector.formatargspec #27578

@jhpalmieri

Description

@jhpalmieri

After upgrading to Sphinx 1.8.5 in #26451, Sphinx's function formatargspec is deprecated, so we should not use anymore it in src/sage_setup/docbuild/ext/sage_autodoc.py.

The deprecation warning advises to replace the use of sphinx.ext.autodoc.inspector.formatargspec
by that of sphinx.util.inspect.Signature.

For ordinary Python functions, we may be able to change formatargspec(my_func, *argspec) to Signature(my_func).format_args(). I don't think this works with Cython functions, though.

CC: @kiwifb @jdemeyer @slel @strogdon @tobiasdiez

Component: documentation

Keywords: sphinx, formatargspec, Signature

Issue created by migration from https://trac.sagemath.org/ticket/27578

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions