diff options
Diffstat (limited to 'sphinx/util/inspect.py')
-rw-r--r-- | sphinx/util/inspect.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py index af8102402..80cac97d9 100644 --- a/sphinx/util/inspect.py +++ b/sphinx/util/inspect.py @@ -22,7 +22,7 @@ from inspect import ( # NOQA from io import StringIO from typing import Any, Callable, Mapping, List, Tuple -from sphinx.deprecation import RemovedInSphinx40Warning +from sphinx.deprecation import RemovedInSphinx40Warning, RemovedInSphinx50Warning from sphinx.util import logging from sphinx.util.typing import stringify as stringify_annotation @@ -54,6 +54,8 @@ memory_address_re = re.compile(r' at 0x[0-9a-f]{8,16}(?=>)', re.IGNORECASE) def getargspec(func): """Like inspect.getfullargspec but supports bound methods, and wrapped methods.""" + warnings.warn('sphinx.ext.inspect.getargspec() is deprecated', + RemovedInSphinx50Warning) # On 3.5+, signature(int) or similar raises ValueError. On 3.4, it # succeeds with a bogus signature. We want a TypeError uniformly, to # match historical behavior. |