summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docutils/RELEASE-NOTES.txt2
-rw-r--r--docutils/docutils/writers/__init__.py14
-rw-r--r--docutils/docutils/writers/null.py4
3 files changed, 15 insertions, 5 deletions
diff --git a/docutils/RELEASE-NOTES.txt b/docutils/RELEASE-NOTES.txt
index c4b09106d..a7e9144e7 100644
--- a/docutils/RELEASE-NOTES.txt
+++ b/docutils/RELEASE-NOTES.txt
@@ -133,6 +133,8 @@ Drop support for Python 3.7 and 3.8 in Docutils 0.21.
- Remove ``use_verbatim_when_possible`` setting
(use literal_block_env_: verbatim) in Docutils 2.0.
+* "null" writer: output will change to the empty string in Docutils 0.22.
+
* The default value of the `auto_encode` argument of `core.publish_str()`,
`core.publish_from_doctree()`, and `core.publish_programmatically()`
will change to ``False`` in Docutils 0.22.
diff --git a/docutils/docutils/writers/__init__.py b/docutils/docutils/writers/__init__.py
index 84be8f6a2..d15ccd29f 100644
--- a/docutils/docutils/writers/__init__.py
+++ b/docutils/docutils/writers/__init__.py
@@ -36,18 +36,22 @@ class Writer(Component):
universal.StripClassesAndElements]
document = None
- """The document to write (Docutils doctree); set by `write`."""
+ """The document to write (Docutils doctree); set by `write()`."""
output = None
- """Final translated form of `document` (Unicode string for text, binary
- string for other forms); set by `translate`."""
+ """Final translated form of `document`
+
+ (`str` for text, `bytes` for binary formats); set by `translate()`.
+ """
language = None
- """Language module for the document; set by `write`."""
+ """Language module for the document; set by `write()`."""
destination = None
"""`docutils.io` Output object; where to write the document.
- Set by `write`."""
+
+ Set by `write()`.
+ """
def __init__(self):
diff --git a/docutils/docutils/writers/null.py b/docutils/docutils/writers/null.py
index 6c30627e2..7b303f8d7 100644
--- a/docutils/docutils/writers/null.py
+++ b/docutils/docutils/writers/null.py
@@ -4,6 +4,9 @@
"""
A do-nothing Writer.
+
+`self.output` will change from ``None`` to the empty string
+in Docutils 0.22.
"""
from docutils import writers
@@ -18,4 +21,5 @@ class Writer(writers.UnfilteredWriter):
config_section_dependencies = ('writers',)
def translate(self):
+ # output = None # TODO in 0.22
pass