Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-17 16:06:51 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-17 16:08:00 +0300
commit636ca67528212772db62771c41d1d76fb3af820e (patch)
tree072c298f09601ebb5a2f3da0e40be0ccce03b5c8 /sphinx/io.py
parentde49b991f635faa0cf2cd07fae29bab3073b0662 (diff)
Deprecate SphinxBaseFileInput
Diffstat (limited to 'sphinx/io.py')
-rw-r--r--sphinx/io.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/sphinx/io.py b/sphinx/io.py
index 2f942dcca..fb3664c89 100644
--- a/sphinx/io.py
+++ b/sphinx/io.py
@@ -185,15 +185,14 @@ class SphinxBaseFileInput(FileInput):
self.app = app
self.env = env
+ warnings.warn('%s is deprecated.' % self.__class__.__name__,
+ RemovedInSphinx30Warning, stacklevel=2)
+
kwds['error_handler'] = 'sphinx' # py3: handle error on open.
super().__init__(*args, **kwds)
def warn_and_replace(self, error):
# type: (Any) -> Tuple
- warnings.warn('SphinxBaseFileInput.warn_and_replace() is deprecated. '
- 'Use UnicodeDecodeErrorHandler instead.',
- RemovedInSphinx30Warning, stacklevel=2)
-
return UnicodeDecodeErrorHandler(self.env.docname)(error)
@@ -246,9 +245,6 @@ class SphinxRSTFileInput(SphinxBaseFileInput):
def read(self): # type: ignore
# type: () -> StringList
- warnings.warn('SphinxRSTFileInput is deprecated.',
- RemovedInSphinx30Warning, stacklevel=2)
-
inputstring = super().read()
lines = string2lines(inputstring, convert_whitespace=True)
content = StringList()