mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Deprecate unused and untested sphinx.util functions
sphinx.util.attrdict: Last use removed inb09e628b0f
. sphinx.util.PeekableIterator: Last use removed in85b8a451a6
.
This commit is contained in:
parent
b13a6ff3e6
commit
3a96ce6591
2
CHANGES
2
CHANGES
@ -50,9 +50,11 @@ Deprecated
|
|||||||
* ``sphinx.ext.doctest.doctest_encode()``
|
* ``sphinx.ext.doctest.doctest_encode()``
|
||||||
* ``sphinx.io.SphinxRSTFileInput``
|
* ``sphinx.io.SphinxRSTFileInput``
|
||||||
* ``sphinx.testing.util.remove_unicode_literal()``
|
* ``sphinx.testing.util.remove_unicode_literal()``
|
||||||
|
* ``sphinx.util.attrdict``
|
||||||
* ``sphinx.util.force_decode()``
|
* ``sphinx.util.force_decode()``
|
||||||
* ``sphinx.util.get_matching_docs()`` is deprecated
|
* ``sphinx.util.get_matching_docs()`` is deprecated
|
||||||
* ``sphinx.util.osutil.walk()``
|
* ``sphinx.util.osutil.walk()``
|
||||||
|
* ``sphinx.util.PeekableIterator``
|
||||||
* ``sphinx.util.pycompat.u``
|
* ``sphinx.util.pycompat.u``
|
||||||
* ``sphinx.writers.latex.LaTeXTranslator.babel_defmacro()``
|
* ``sphinx.writers.latex.LaTeXTranslator.babel_defmacro()``
|
||||||
* ``sphinx.writers.latex.TextTranslator._make_visit_admonition()``
|
* ``sphinx.writers.latex.TextTranslator._make_visit_admonition()``
|
||||||
|
@ -162,6 +162,11 @@ The following is a list of deprecated interfaces.
|
|||||||
- 4.0
|
- 4.0
|
||||||
- N/A
|
- N/A
|
||||||
|
|
||||||
|
* - ``sphinx.util.attrdict``
|
||||||
|
- 2.0
|
||||||
|
- 4.0
|
||||||
|
- N/A
|
||||||
|
|
||||||
* - ``sphinx.util.force_decode()``
|
* - ``sphinx.util.force_decode()``
|
||||||
- 2.0
|
- 2.0
|
||||||
- 4.0
|
- 4.0
|
||||||
@ -182,6 +187,11 @@ The following is a list of deprecated interfaces.
|
|||||||
- 4.0
|
- 4.0
|
||||||
- N/A
|
- N/A
|
||||||
|
|
||||||
|
* - ``sphinx.util.PeekableIterator``
|
||||||
|
- 2.0
|
||||||
|
- 4.0
|
||||||
|
- N/A
|
||||||
|
|
||||||
* - ``sphinx.application.Sphinx._setting_up_extension``
|
* - ``sphinx.application.Sphinx._setting_up_extension``
|
||||||
- 2.0
|
- 2.0
|
||||||
- 3.0
|
- 3.0
|
||||||
|
@ -499,6 +499,11 @@ def force_decode(string, encoding):
|
|||||||
|
|
||||||
|
|
||||||
class attrdict(dict):
|
class attrdict(dict):
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(attrdict, self).__init__(*args, **kwargs)
|
||||||
|
warnings.warn('The attrdict class is deprecated.',
|
||||||
|
RemovedInSphinx40Warning, stacklevel=2)
|
||||||
|
|
||||||
def __getattr__(self, key):
|
def __getattr__(self, key):
|
||||||
# type: (unicode) -> unicode
|
# type: (unicode) -> unicode
|
||||||
return self[key]
|
return self[key]
|
||||||
@ -573,6 +578,8 @@ class PeekableIterator:
|
|||||||
# type: (Iterable) -> None
|
# type: (Iterable) -> None
|
||||||
self.remaining = deque() # type: deque
|
self.remaining = deque() # type: deque
|
||||||
self._iterator = iter(iterable)
|
self._iterator = iter(iterable)
|
||||||
|
warnings.warn('PeekableIterator is deprecated.',
|
||||||
|
RemovedInSphinx40Warning, stacklevel=2)
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
# type: () -> PeekableIterator
|
# type: () -> PeekableIterator
|
||||||
|
Loading…
Reference in New Issue
Block a user