summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Palard <julien@palard.fr>2021-01-04 13:50:11 +0100
committerJulien Palard <julien@palard.fr>2021-01-04 13:50:11 +0100
commitbcacd9d9e6d62d99fba853f0b9db38d7efd221c4 (patch)
tree3df2b9d5ddf034900e27a3655fd28fc37c60ff1a
parentf24ac455521e46bf9f6c7971aec0e4abec4451c4 (diff)
downloadcpython-git-revert-23828-backport-dcc997c-3.8.tar.gz
Revert "[3.8] [doc] Fix erroneous backslashes in signatures and names (GH-23658)"revert-23828-backport-dcc997c-3.8
This partially reverts commit 02349e2dc9d93202c658ae383b2de2e36b2366f8, which was removing backslashes in documentations compiled with Sphinx < 3, used for Python 3.8 and 3.9 docs.
-rw-r--r--Doc/library/asyncio-stream.rst2
-rw-r--r--Doc/library/base64.rst2
-rw-r--r--Doc/library/difflib.rst6
-rw-r--r--Doc/library/email.header.rst2
-rw-r--r--Doc/library/functions.rst2
-rw-r--r--Doc/library/http.cookies.rst2
-rw-r--r--Doc/library/io.rst2
-rw-r--r--Doc/library/xml.dom.minidom.rst2
-rw-r--r--Doc/requirements.txt2
9 files changed, 11 insertions, 11 deletions
diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst
index 584bf10fc0..714de8d41a 100644
--- a/Doc/library/asyncio-stream.rst
+++ b/Doc/library/asyncio-stream.rst
@@ -192,7 +192,7 @@ StreamReader
can be read. Use the :attr:`IncompleteReadError.partial`
attribute to get the partially read data.
- .. coroutinemethod:: readuntil(separator=b'\n')
+ .. coroutinemethod:: readuntil(separator=b'\\n')
Read data from the stream until *separator* is found.
diff --git a/Doc/library/base64.rst b/Doc/library/base64.rst
index 3c63c15ad4..ad9f5f58be 100644
--- a/Doc/library/base64.rst
+++ b/Doc/library/base64.rst
@@ -178,7 +178,7 @@ The modern interface provides:
.. versionadded:: 3.4
-.. function:: a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \t\n\r\v')
+.. function:: a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \\t\\n\\r\\v')
Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and
return the decoded :class:`bytes`.
diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst
index e6dd1dd7a5..a8543b38c1 100644
--- a/Doc/library/difflib.rst
+++ b/Doc/library/difflib.rst
@@ -149,7 +149,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
contains a good example of its use.
-.. function:: context_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n')
+.. function:: context_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\\n')
Compare *a* and *b* (lists of strings); return a delta (a :term:`generator`
generating the delta lines) in context diff format.
@@ -279,7 +279,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
emu
-.. function:: unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n')
+.. function:: unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\\n')
Compare *a* and *b* (lists of strings); return a delta (a :term:`generator`
generating the delta lines) in unified diff format.
@@ -321,7 +321,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
See :ref:`difflib-interface` for a more detailed example.
-.. function:: diff_bytes(dfunc, a, b, fromfile=b'', tofile=b'', fromfiledate=b'', tofiledate=b'', n=3, lineterm=b'\n')
+.. function:: diff_bytes(dfunc, a, b, fromfile=b'', tofile=b'', fromfiledate=b'', tofiledate=b'', n=3, lineterm=b'\\n')
Compare *a* and *b* (lists of bytes objects) using *dfunc*; yield a
sequence of delta lines (also bytes) in the format returned by *dfunc*.
diff --git a/Doc/library/email.header.rst b/Doc/library/email.header.rst
index e093f13893..07152c224f 100644
--- a/Doc/library/email.header.rst
+++ b/Doc/library/email.header.rst
@@ -116,7 +116,7 @@ Here is the :class:`Header` class description:
if *s* is a byte string.
- .. method:: encode(splitchars=';, \t', maxlinelen=None, linesep='\n')
+ .. method:: encode(splitchars=';, \\t', maxlinelen=None, linesep='\\n')
Encode a message header into an RFC-compliant format, possibly wrapping
long lines and encapsulating non-ASCII parts in base64 or quoted-printable
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index be98d30488..4f5fe6bc23 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1312,7 +1312,7 @@ are always available. They are listed here in alphabetical order.
supported.
-.. function:: print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)
+.. function:: print(*objects, sep=' ', end='\\n', file=sys.stdout, flush=False)
Print *objects* to the text stream *file*, separated by *sep* and followed
by *end*. *sep*, *end*, *file* and *flush*, if present, must be given as keyword
diff --git a/Doc/library/http.cookies.rst b/Doc/library/http.cookies.rst
index a2c1eb00d8..17792b2005 100644
--- a/Doc/library/http.cookies.rst
+++ b/Doc/library/http.cookies.rst
@@ -93,7 +93,7 @@ Cookie Objects
:meth:`value_decode` are inverses on the range of *value_decode*.
-.. method:: BaseCookie.output(attrs=None, header='Set-Cookie:', sep='\r\n')
+.. method:: BaseCookie.output(attrs=None, header='Set-Cookie:', sep='\\r\\n')
Return a string representation suitable to be sent as HTTP headers. *attrs* and
*header* are sent to each :class:`Morsel`'s :meth:`output` method. *sep* is used
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index 667e4c654f..32151a0ace 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -959,7 +959,7 @@ Text I/O
.. versionadded:: 3.7
-.. class:: StringIO(initial_value='', newline='\n')
+.. class:: StringIO(initial_value='', newline='\\n')
An in-memory stream for text I/O. The text buffer is discarded when the
:meth:`~IOBase.close` method is called.
diff --git a/Doc/library/xml.dom.minidom.rst b/Doc/library/xml.dom.minidom.rst
index 673af8326a..8711242d95 100644
--- a/Doc/library/xml.dom.minidom.rst
+++ b/Doc/library/xml.dom.minidom.rst
@@ -164,7 +164,7 @@ module documentation. This section lists the differences between the API and
The :meth:`toxml` method now preserves the attribute order specified
by the user.
-.. method:: Node.toprettyxml(indent="\t", newl="\n", encoding=None)
+.. method:: Node.toprettyxml(indent="\\t", newl="\\n", encoding=None)
Return a pretty-printed version of the document. *indent* specifies the
indentation string and defaults to a tabulator; *newl* specifies the string
diff --git a/Doc/requirements.txt b/Doc/requirements.txt
index d30ff39c8c..47b78eeac8 100644
--- a/Doc/requirements.txt
+++ b/Doc/requirements.txt
@@ -3,7 +3,7 @@
# Sphinx version is pinned so that new versions that introduce new warnings
# won't suddenly cause build failures. Updating the version is fine as long
# as no warnings are raised by doing so.
-sphinx
+sphinx==2.4.4
blurb