From df77513a57ba826874f80001dd648ecb7c9b0848 Mon Sep 17 00:00:00 2001 From: milde Date: Sun, 12 Apr 2015 09:57:05 +0000 Subject: [PATCH] Revert removal of obsolete `handle_io_errors` arg. Still used by Sphinx. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7864 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/HISTORY.txt | 4 ---- docutils/RELEASE-NOTES.txt | 2 ++ docutils/docutils/io.py | 6 ++++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docutils/HISTORY.txt b/docutils/HISTORY.txt index 3024859d0..1bb5a7a26 100644 --- a/docutils/HISTORY.txt +++ b/docutils/HISTORY.txt @@ -16,10 +16,6 @@ Changes Since 0.12 ================== -* docutils/io.py - - - removed the `handle_io_errors` option from io.FileInput/Output. - * docutils/nodes.py - Fix [ 253 ] Attribute key without value not allowed in XML. diff --git a/docutils/RELEASE-NOTES.txt b/docutils/RELEASE-NOTES.txt index f749e8a3f..353281bc3 100644 --- a/docutils/RELEASE-NOTES.txt +++ b/docutils/RELEASE-NOTES.txt @@ -20,6 +20,8 @@ more detailed list of changes, please see the `Docutils History`_. Future changes ============== +* remove the `handle_io_errors` option from io.FileInput/Output. + * »Prune« the doctree (no change to the reST input syntax): - "doctest" element -> literal block with "pycon" (python-console) diff --git a/docutils/docutils/io.py b/docutils/docutils/io.py index bdff123cd..83a40c963 100644 --- a/docutils/docutils/io.py +++ b/docutils/docutils/io.py @@ -204,7 +204,7 @@ class FileInput(Input): """ def __init__(self, source=None, source_path=None, encoding=None, error_handler='strict', - autoclose=True, mode='rU'): + autoclose=True, handle_io_errors=None, mode='rU'): """ :Parameters: - `source`: either a file-like object (which is read directly), or @@ -214,6 +214,7 @@ class FileInput(Input): - `error_handler`: the encoding error handler to use. - `autoclose`: close automatically after read (except when `sys.stdin` is the source). + - `handle_io_errors`: ignored, deprecated, will be removed. - `mode`: how the file is to be opened (see standard function `open`). The default 'rU' provides universal newline support for text files. @@ -302,7 +303,7 @@ class FileOutput(Output): def __init__(self, destination=None, destination_path=None, encoding=None, error_handler='strict', autoclose=True, - mode=None): + handle_io_errors=None, mode=None): """ :Parameters: - `destination`: either a file-like object (which is written @@ -314,6 +315,7 @@ class FileOutput(Output): - `error_handler`: the encoding error handler to use. - `autoclose`: close automatically after write (except when `sys.stdout` or `sys.stderr` is the destination). + - `handle_io_errors`: ignored, deprecated, will be removed. - `mode`: how the file is to be opened (see standard function `open`). The default is 'w', providing universal newline support for text files. -- 2.11.4.GIT