Deprecate sphinx.util.inspect.Parameter

This commit is contained in:
Takeshi KOMIYA 2018-12-15 20:48:30 +09:00
parent a1e845d964
commit 6b24c069c3
3 changed files with 12 additions and 1 deletions

View File

@ -62,7 +62,8 @@ Deprecated
* ``sphinx.testing.util.remove_unicode_literal()``
* ``sphinx.util.attrdict``
* ``sphinx.util.force_decode()``
* ``sphinx.util.get_matching_docs()`` is deprecated
* ``sphinx.util.get_matching_docs()``
* ``sphinx.util.inspect.Parameter``
* ``sphinx.util.osutil.walk()``
* ``sphinx.util.PeekableIterator``
* ``sphinx.util.pycompat.u``

View File

@ -202,6 +202,11 @@ The following is a list of deprecated interfaces.
- 4.0
- ``sphinx.util.get_matching_files()``
* - ``sphinx.util.inspect.Parameter``
- 2.0
- 3.0
- N/A
* - ``sphinx.util.osutil.walk()``
- 2.0
- 4.0

View File

@ -16,10 +16,12 @@ import inspect
import re
import sys
import typing
import warnings
from functools import partial
from six import StringIO
from sphinx.deprecation import RemovedInSphinx30Warning
from sphinx.util import logging
from sphinx.util.pycompat import NoneType
@ -289,6 +291,9 @@ class Parameter:
self.default = default
self.annotation = self.empty
warnings.warn('sphinx.util.inspect.Parameter is deprecated.',
RemovedInSphinx30Warning, stacklevel=2)
class Signature:
"""The Signature object represents the call signature of a callable object and