Skip to content

Commit

Permalink
Revert "bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (python…
Browse files Browse the repository at this point in the history
…GH-24282)"

This reverts commit 5c1f15b
  • Loading branch information
AA-Turner committed Jun 11, 2022
1 parent 733e15f commit 3fd0a1c
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 12 deletions.
2 changes: 0 additions & 2 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,5 +237,3 @@
# bpo-40204: Disable warnings on Sphinx 2 syntax of the C domain since the
# documentation is built with -W (warnings treated as errors).
c_warn_on_allowed_pre_v3 = False

strip_signature_backslash = True
2 changes: 1 addition & 1 deletion Doc/library/asyncio-stream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/base64.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,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`.
Expand Down
6 changes: 3 additions & 3 deletions Doc/library/difflib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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*.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/email.header.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,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
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/http.cookies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ Text I/O
The method supports ``encoding="locale"`` option.


.. class:: StringIO(initial_value='', newline='\\n')
.. class:: StringIO(initial_value='', newline='\n')

A text stream using an in-memory text buffer. It inherits
:class:`TextIOBase`.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/xml.dom.minidom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ module documentation. This section lists the differences between the API and
.. versionchanged:: 3.9
The *standalone* parameter was added.

.. method:: Node.toprettyxml(indent="\\t", newl="\\n", encoding=None, \
.. method:: Node.toprettyxml(indent="\t", newl="\n", encoding=None, \
standalone=None)

Return a pretty-printed version of the document. *indent* specifies the
Expand Down

0 comments on commit 3fd0a1c

Please sign in to comment.