diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2019-09-18 10:13:17 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2019-09-18 10:13:17 +0000 |
| commit | d7fd7ec3b24febe58bd0ad7b75527e51ad31de71 (patch) | |
| tree | 3a817250d615ef44f0d35cf4e601bf3ddd3af707 | |
| parent | 30d599175d608cdc5fe53cb61c44ab5f4f732ce3 (diff) | |
| download | docutils-d7fd7ec3b24febe58bd0ad7b75527e51ad31de71.tar.gz | |
Remove the `handle_io_errors` option from io.FileInput/Output.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8394 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
| -rw-r--r-- | docutils/HISTORY.txt | 4 | ||||
| -rw-r--r-- | docutils/RELEASE-NOTES.txt | 16 | ||||
| -rw-r--r-- | docutils/docutils/io.py | 15 |
3 files changed, 14 insertions, 21 deletions
diff --git a/docutils/HISTORY.txt b/docutils/HISTORY.txt index eefd87d41..044cc1356 100644 --- a/docutils/HISTORY.txt +++ b/docutils/HISTORY.txt @@ -30,6 +30,10 @@ Changes Since 0.15 __ http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#escaping-mechanism +* docutils/io.py + + - Remove the `handle_io_errors` option from io.FileInput/Output. + * docutils/nodes.py - Speed up Node.next_node(). diff --git a/docutils/RELEASE-NOTES.txt b/docutils/RELEASE-NOTES.txt index 1bceddf9f..4ca861dcd 100644 --- a/docutils/RELEASE-NOTES.txt +++ b/docutils/RELEASE-NOTES.txt @@ -30,9 +30,6 @@ Future changes __ docs/user/latex.html#classes -* Remove the `handle_io_errors` option from io.FileInput/Output. - Used by Sphinx up to version 1.3.1, fixed in 1.3.2 (Nov 29, 2015). - * Node.traverse() will return an iterator instead of a list. * Remove `utils.unique_combinations` (obsoleted by `itertools.combinations`). @@ -49,10 +46,6 @@ Future changes .. _rst2html.py: docs/user/tools.html#rst2html-py -* Allow escaping of author-separators in `bibliographic fields`__. - - __ docs/ref/rst/restructuredtext.html#bibliographic-fields - Release 0.16 ============ @@ -71,9 +64,12 @@ Release 0.16 * reStructuredText: - - Keep `backslash escapes`__ in the document tree. + - Keep `backslash escapes`__ in the document tree. This allows, e.g., + escaping of author-separators in `bibliographic fields`__. __ http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#escaping-mechanism + __ docs/ref/rst/restructuredtext.html#bibliographic-fields + * LaTeX writer: @@ -81,6 +77,10 @@ Release 0.16 - Deprecate ``\docutilsrole`` prefix for styling commands: use ``\DUrole`` instead. +* docutils/io.py + + - Remove the `handle_io_errors` option from io.FileInput/Output. + Release 0.15 ============ diff --git a/docutils/docutils/io.py b/docutils/docutils/io.py index 5e44a0fd9..fcc1aaa08 100644 --- a/docutils/docutils/io.py +++ b/docutils/docutils/io.py @@ -208,7 +208,7 @@ class FileInput(Input): def __init__(self, source=None, source_path=None, encoding=None, error_handler='strict', autoclose=True, - mode='r' if sys.version_info >= (3, 0) else 'rU', **kwargs): + mode='r' if sys.version_info >= (3, 0) else 'rU'): """ :Parameters: - `source`: either a file-like object (which is read directly), or @@ -220,21 +220,11 @@ class FileInput(Input): `sys.stdin` is the source). - `mode`: how the file is to be opened (see standard function `open`). The default 'rU' provides universal newline support - for text files on Python < 3.4. + for text files with Python 2.x. """ Input.__init__(self, source, source_path, encoding, error_handler) self.autoclose = autoclose self._stderr = ErrorOutput() - # deprecation warning - for key in kwargs: - if key == 'handle_io_errors': - sys.stderr.write('deprecation warning: ' - 'io.FileInput() argument `handle_io_errors` ' - 'is ignored since Docutils 0.10 (2012-12-16) ' - 'and will soon be removed.') - else: - raise TypeError('__init__() got an unexpected keyword ' - "argument '%s'" % key) if source is None: if source_path: @@ -244,7 +234,6 @@ class FileInput(Input): 'errors': self.error_handler} else: kwargs = {} - try: self.source = open(source_path, mode, **kwargs) except IOError as error: |
