-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Describe the bug
When installing sphinx=7.4.0 that was just released, using the typing.ParamSpec results in the following warning:
WARNING: Failed to get a method signature for thing.ProcessFunctionType.run: unhashable type: 'ParamSpecArgs'
How to Reproduce
conf.py
import os
import sys
sys.path.insert(0, os.path.abspath('../src'))
extensions = ['sphinx.ext.autodoc']
index.rst
.. automodule:: thing
:members:
The following source file
import typing as t
P = t.ParamSpec('P')
R_co = t.TypeVar('R_co', covariant=True)
N = t.TypeVar('N', bound=str)
class ProcessFunctionType(t.Protocol, t.Generic[P, R_co, N]):
"""Protocol type."""
def run(self, *args: P.args, **kwargs: P.kwargs) -> R_co:
"""Some method."""compiled with Sphinx v7.4
Environment Information
Only happens for `sphinx==7.4.0`. Builds fine with older versions
Sphinx extensions
sphinx.ext.autodocAdditional context
No response