deprecate SphinxRSTFileInput

This commit is contained in:
Takeshi KOMIYA
2018-12-05 23:11:16 +09:00
parent 8a6179aa61
commit c8ce761a73
3 changed files with 9 additions and 1 deletions
+1
View File
@@ -48,6 +48,7 @@ Deprecated
* ``sphinx.config.check_unicode()``
* ``sphinx.ext.autodoc.importer._MockImporter``
* ``sphinx.ext.doctest.doctest_encode()``
* ``sphinx.io.SphinxRSTFileInput``
* ``sphinx.testing.util.remove_unicode_literal()``
* ``sphinx.util.force_decode()``
* ``sphinx.util.get_matching_docs()`` is deprecated
+5
View File
@@ -197,6 +197,11 @@ The following is a list of deprecated interfaces.
- 3.0
- N/A
* - ``sphinx.io.SphinxRSTFileInput``
- 2.0
- 3.0
- N/A
* - ``sphinx.writers.latex.LaTeXTranslator._make_visit_admonition()``
- 2.0
- 3.0
+3 -1
View File
@@ -252,6 +252,9 @@ class SphinxRSTFileInput(SphinxBaseFileInput):
def read(self):
# type: () -> StringList
warnings.warn('SphinxRSTFileInput is deprecated.',
RemovedInSphinx30Warning, stacklevel=2)
inputstring = super(SphinxRSTFileInput, self).read()
lines = string2lines(inputstring, convert_whitespace=True)
content = StringList()
@@ -320,7 +323,6 @@ def read_doc(app, env, filename):
def setup(app):
# type: (Sphinx) -> Dict[unicode, Any]
app.registry.add_source_input(SphinxFileInput)
app.registry.add_source_input(SphinxRSTFileInput)
return {
'version': 'builtin',