Skip to content

Commit e89993c

Browse files
[3.9] [doc] Fix erroneous backslashes in signatures and names (GH-23658) (GH-23827)
The issue being resolved is shown in the 3.10 docs (if you select docs for older versions you won't see a visual glitch). The newer sphinx version that produces the 3.10 docs doesn't treat the backslash to escape things in some situations it previously did.. (cherry picked from commit dcc997c) Co-authored-by: Andre Delfino <[email protected]>
1 parent b4b323c commit e89993c

32 files changed

+90
-90
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ Creating Futures and Tasks
321321

322322
.. versionadded:: 3.5.2
323323

324-
.. method:: loop.create_task(coro, \*, name=None)
324+
.. method:: loop.create_task(coro, *, name=None)
325325

326326
Schedule the execution of a :ref:`coroutine`.
327327
Return a :class:`Task` object.
@@ -356,7 +356,7 @@ Opening network connections
356356
^^^^^^^^^^^^^^^^^^^^^^^^^^^
357357

358358
.. coroutinemethod:: loop.create_connection(protocol_factory, \
359-
host=None, port=None, \*, ssl=None, \
359+
host=None, port=None, *, ssl=None, \
360360
family=0, proto=0, flags=0, sock=None, \
361361
local_addr=None, server_hostname=None, \
362362
ssl_handshake_timeout=None, \
@@ -482,7 +482,7 @@ Opening network connections
482482
that can be used directly in async/await code.
483483

484484
.. coroutinemethod:: loop.create_datagram_endpoint(protocol_factory, \
485-
local_addr=None, remote_addr=None, \*, \
485+
local_addr=None, remote_addr=None, *, \
486486
family=0, proto=0, flags=0, \
487487
reuse_address=None, reuse_port=None, \
488488
allow_broadcast=None, sock=None)
@@ -559,7 +559,7 @@ Opening network connections
559559
Added support for Windows.
560560

561561
.. coroutinemethod:: loop.create_unix_connection(protocol_factory, \
562-
path=None, \*, ssl=None, sock=None, \
562+
path=None, *, ssl=None, sock=None, \
563563
server_hostname=None, ssl_handshake_timeout=None)
564564
565565
Create a Unix connection.
@@ -592,7 +592,7 @@ Creating network servers
592592
^^^^^^^^^^^^^^^^^^^^^^^^
593593

594594
.. coroutinemethod:: loop.create_server(protocol_factory, \
595-
host=None, port=None, \*, \
595+
host=None, port=None, *, \
596596
family=socket.AF_UNSPEC, \
597597
flags=socket.AI_PASSIVE, \
598598
sock=None, backlog=100, ssl=None, \
@@ -683,7 +683,7 @@ Creating network servers
683683

684684

685685
.. coroutinemethod:: loop.create_unix_server(protocol_factory, path=None, \
686-
\*, sock=None, backlog=100, ssl=None, \
686+
*, sock=None, backlog=100, ssl=None, \
687687
ssl_handshake_timeout=None, start_serving=True)
688688
689689
Similar to :meth:`loop.create_server` but works with the
@@ -708,7 +708,7 @@ Creating network servers
708708
The *path* parameter can now be a :class:`~pathlib.Path` object.
709709

710710
.. coroutinemethod:: loop.connect_accepted_socket(protocol_factory, \
711-
sock, \*, ssl=None, ssl_handshake_timeout=None)
711+
sock, *, ssl=None, ssl_handshake_timeout=None)
712712
713713
Wrap an already accepted connection into a transport/protocol pair.
714714

@@ -773,7 +773,7 @@ TLS Upgrade
773773
^^^^^^^^^^^
774774

775775
.. coroutinemethod:: loop.start_tls(transport, protocol, \
776-
sslcontext, \*, server_side=False, \
776+
sslcontext, *, server_side=False, \
777777
server_hostname=None, ssl_handshake_timeout=None)
778778
779779
Upgrade an existing transport-based connection to TLS.
@@ -806,7 +806,7 @@ TLS Upgrade
806806
Watching file descriptors
807807
^^^^^^^^^^^^^^^^^^^^^^^^^
808808

809-
.. method:: loop.add_reader(fd, callback, \*args)
809+
.. method:: loop.add_reader(fd, callback, *args)
810810

811811
Start monitoring the *fd* file descriptor for read availability and
812812
invoke *callback* with the specified arguments once *fd* is available for
@@ -816,7 +816,7 @@ Watching file descriptors
816816

817817
Stop monitoring the *fd* file descriptor for read availability.
818818

819-
.. method:: loop.add_writer(fd, callback, \*args)
819+
.. method:: loop.add_writer(fd, callback, *args)
820820

821821
Start monitoring the *fd* file descriptor for write availability and
822822
invoke *callback* with the specified arguments once *fd* is available for
@@ -930,7 +930,7 @@ convenient.
930930
:meth:`loop.create_server` and :func:`start_server`.
931931

932932
.. coroutinemethod:: loop.sock_sendfile(sock, file, offset=0, count=None, \
933-
\*, fallback=True)
933+
*, fallback=True)
934934
935935
Send a file using high-performance :mod:`os.sendfile` if possible.
936936
Return the total number of bytes sent.
@@ -964,7 +964,7 @@ convenient.
964964
DNS
965965
^^^
966966

967-
.. coroutinemethod:: loop.getaddrinfo(host, port, \*, family=0, \
967+
.. coroutinemethod:: loop.getaddrinfo(host, port, *, family=0, \
968968
type=0, proto=0, flags=0)
969969

970970
Asynchronous version of :meth:`socket.getaddrinfo`.
@@ -1029,7 +1029,7 @@ Working with pipes
10291029
Unix signals
10301030
^^^^^^^^^^^^
10311031

1032-
.. method:: loop.add_signal_handler(signum, callback, \*args)
1032+
.. method:: loop.add_signal_handler(signum, callback, *args)
10331033

10341034
Set *callback* as the handler for the *signum* signal.
10351035

@@ -1064,7 +1064,7 @@ Unix signals
10641064
Executing code in thread or process pools
10651065
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10661066

1067-
.. awaitablemethod:: loop.run_in_executor(executor, func, \*args)
1067+
.. awaitablemethod:: loop.run_in_executor(executor, func, *args)
10681068

10691069
Arrange for *func* to be called in the specified executor.
10701070

@@ -1234,9 +1234,9 @@ async/await code consider using the high-level
12341234
subprocesses. See :ref:`Subprocess Support on Windows
12351235
<asyncio-windows-subprocess>` for details.
12361236

1237-
.. coroutinemethod:: loop.subprocess_exec(protocol_factory, \*args, \
1237+
.. coroutinemethod:: loop.subprocess_exec(protocol_factory, *args, \
12381238
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
1239-
stderr=subprocess.PIPE, \*\*kwargs)
1239+
stderr=subprocess.PIPE, **kwargs)
12401240
12411241
Create a subprocess from one or more string arguments specified by
12421242
*args*.
@@ -1316,9 +1316,9 @@ async/await code consider using the high-level
13161316
conforms to the :class:`asyncio.SubprocessTransport` base class and
13171317
*protocol* is an object instantiated by the *protocol_factory*.
13181318

1319-
.. coroutinemethod:: loop.subprocess_shell(protocol_factory, cmd, \*, \
1319+
.. coroutinemethod:: loop.subprocess_shell(protocol_factory, cmd, *, \
13201320
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
1321-
stderr=subprocess.PIPE, \*\*kwargs)
1321+
stderr=subprocess.PIPE, **kwargs)
13221322
13231323
Create a subprocess from *cmd*, which can be a :class:`str` or a
13241324
:class:`bytes` string encoded to the

Doc/library/asyncio-future.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Future Functions
3131
.. versionadded:: 3.5
3232

3333

34-
.. function:: ensure_future(obj, \*, loop=None)
34+
.. function:: ensure_future(obj, *, loop=None)
3535

3636
Return:
3737

@@ -58,7 +58,7 @@ Future Functions
5858
The function accepts any :term:`awaitable` object.
5959

6060

61-
.. function:: wrap_future(future, \*, loop=None)
61+
.. function:: wrap_future(future, *, loop=None)
6262

6363
Wrap a :class:`concurrent.futures.Future` object in a
6464
:class:`asyncio.Future` object.
@@ -67,7 +67,7 @@ Future Functions
6767
Future Object
6868
=============
6969

70-
.. class:: Future(\*, loop=None)
70+
.. class:: Future(*, loop=None)
7171

7272
A Future represents an eventual result of an asynchronous
7373
operation. Not thread-safe.

Doc/library/asyncio-policy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ implementation used by the asyncio event loop:
159159

160160
.. class:: AbstractChildWatcher
161161

162-
.. method:: add_child_handler(pid, callback, \*args)
162+
.. method:: add_child_handler(pid, callback, *args)
163163

164164
Register a new child handler.
165165

Doc/library/asyncio-stream.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The following top-level asyncio functions can be used to create
4848
and work with streams:
4949

5050

51-
.. coroutinefunction:: open_connection(host=None, port=None, \*, \
51+
.. coroutinefunction:: open_connection(host=None, port=None, *, \
5252
loop=None, limit=None, ssl=None, family=0, \
5353
proto=0, flags=0, sock=None, local_addr=None, \
5454
server_hostname=None, ssl_handshake_timeout=None)
@@ -74,7 +74,7 @@ and work with streams:
7474
The *ssl_handshake_timeout* parameter.
7575

7676
.. coroutinefunction:: start_server(client_connected_cb, host=None, \
77-
port=None, \*, loop=None, limit=None, \
77+
port=None, *, loop=None, limit=None, \
7878
family=socket.AF_UNSPEC, \
7979
flags=socket.AI_PASSIVE, sock=None, \
8080
backlog=100, ssl=None, reuse_address=None, \
@@ -109,7 +109,7 @@ and work with streams:
109109

110110
.. rubric:: Unix Sockets
111111

112-
.. coroutinefunction:: open_unix_connection(path=None, \*, loop=None, \
112+
.. coroutinefunction:: open_unix_connection(path=None, *, loop=None, \
113113
limit=None, ssl=None, sock=None, \
114114
server_hostname=None, ssl_handshake_timeout=None)
115115

@@ -132,7 +132,7 @@ and work with streams:
132132

133133

134134
.. coroutinefunction:: start_unix_server(client_connected_cb, path=None, \
135-
\*, loop=None, limit=None, sock=None, \
135+
*, loop=None, limit=None, sock=None, \
136136
backlog=100, ssl=None, ssl_handshake_timeout=None, \
137137
start_serving=True)
138138
@@ -192,7 +192,7 @@ StreamReader
192192
can be read. Use the :attr:`IncompleteReadError.partial`
193193
attribute to get the partially read data.
194194

195-
.. coroutinemethod:: readuntil(separator=b'\\n')
195+
.. coroutinemethod:: readuntil(separator=b'\n')
196196

197197
Read data from the stream until *separator* is found.
198198

Doc/library/asyncio-subprocess.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ See also the `Examples`_ subsection.
6161
Creating Subprocesses
6262
=====================
6363

64-
.. coroutinefunction:: create_subprocess_exec(program, \*args, stdin=None, \
64+
.. coroutinefunction:: create_subprocess_exec(program, *args, stdin=None, \
6565
stdout=None, stderr=None, loop=None, \
66-
limit=None, \*\*kwds)
66+
limit=None, **kwds)
6767
6868
Create a subprocess.
6969

@@ -82,7 +82,7 @@ Creating Subprocesses
8282

8383
.. coroutinefunction:: create_subprocess_shell(cmd, stdin=None, \
8484
stdout=None, stderr=None, loop=None, \
85-
limit=None, \*\*kwds)
85+
limit=None, **kwds)
8686
8787
Run the *cmd* shell command.
8888

Doc/library/asyncio-task.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ is :meth:`loop.run_in_executor`.
210210
Running an asyncio Program
211211
==========================
212212

213-
.. function:: run(coro, \*, debug=False)
213+
.. function:: run(coro, *, debug=False)
214214

215215
Execute the :term:`coroutine` *coro* and return the result.
216216

@@ -247,7 +247,7 @@ Running an asyncio Program
247247
Creating Tasks
248248
==============
249249

250-
.. function:: create_task(coro, \*, name=None)
250+
.. function:: create_task(coro, *, name=None)
251251

252252
Wrap the *coro* :ref:`coroutine <coroutine>` into a :class:`Task`
253253
and schedule its execution. Return the Task object.
@@ -283,7 +283,7 @@ Creating Tasks
283283
Sleeping
284284
========
285285

286-
.. coroutinefunction:: sleep(delay, result=None, \*, loop=None)
286+
.. coroutinefunction:: sleep(delay, result=None, *, loop=None)
287287

288288
Block for *delay* seconds.
289289

@@ -319,7 +319,7 @@ Sleeping
319319
Running Tasks Concurrently
320320
==========================
321321

322-
.. awaitablefunction:: gather(\*aws, loop=None, return_exceptions=False)
322+
.. awaitablefunction:: gather(*aws, loop=None, return_exceptions=False)
323323

324324
Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
325325
sequence *concurrently*.
@@ -403,7 +403,7 @@ Running Tasks Concurrently
403403
Shielding From Cancellation
404404
===========================
405405

406-
.. awaitablefunction:: shield(aw, \*, loop=None)
406+
.. awaitablefunction:: shield(aw, *, loop=None)
407407

408408
Protect an :ref:`awaitable object <asyncio-awaitables>`
409409
from being :meth:`cancelled <Task.cancel>`.
@@ -443,7 +443,7 @@ Shielding From Cancellation
443443
Timeouts
444444
========
445445

446-
.. coroutinefunction:: wait_for(aw, timeout, \*, loop=None)
446+
.. coroutinefunction:: wait_for(aw, timeout, *, loop=None)
447447

448448
Wait for the *aw* :ref:`awaitable <asyncio-awaitables>`
449449
to complete with a timeout.
@@ -500,7 +500,7 @@ Timeouts
500500
Waiting Primitives
501501
==================
502502

503-
.. coroutinefunction:: wait(aws, \*, loop=None, timeout=None,\
503+
.. coroutinefunction:: wait(aws, *, loop=None, timeout=None,\
504504
return_when=ALL_COMPLETED)
505505

506506
Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
@@ -590,7 +590,7 @@ Waiting Primitives
590590
deprecated.
591591

592592

593-
.. function:: as_completed(aws, \*, loop=None, timeout=None)
593+
.. function:: as_completed(aws, *, loop=None, timeout=None)
594594

595595
Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
596596
iterable concurrently. Return an iterator of coroutines.
@@ -613,7 +613,7 @@ Waiting Primitives
613613
Running in Threads
614614
==================
615615

616-
.. coroutinefunction:: to_thread(func, /, \*args, \*\*kwargs)
616+
.. coroutinefunction:: to_thread(func, /, *args, **kwargs)
617617

618618
Asynchronously run function *func* in a separate thread.
619619

@@ -743,7 +743,7 @@ Introspection
743743
Task Object
744744
===========
745745

746-
.. class:: Task(coro, \*, loop=None, name=None)
746+
.. class:: Task(coro, *, loop=None, name=None)
747747

748748
A :class:`Future-like <Future>` object that runs a Python
749749
:ref:`coroutine <coroutine>`. Not thread-safe.
@@ -909,7 +909,7 @@ Task Object
909909
See the documentation of :meth:`Future.remove_done_callback`
910910
for more details.
911911

912-
.. method:: get_stack(\*, limit=None)
912+
.. method:: get_stack(*, limit=None)
913913

914914
Return the list of stack frames for this Task.
915915

@@ -930,7 +930,7 @@ Task Object
930930
stack are returned, but the oldest frames of a traceback are
931931
returned. (This matches the behavior of the traceback module.)
932932

933-
.. method:: print_stack(\*, limit=None, file=None)
933+
.. method:: print_stack(*, limit=None, file=None)
934934

935935
Print the stack or traceback for this Task.
936936

Doc/library/base64.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ The modern interface provides:
178178
.. versionadded:: 3.4
179179

180180

181-
.. function:: a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \\t\\n\\r\\v')
181+
.. function:: a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \t\n\r\v')
182182

183183
Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and
184184
return the decoded :class:`bytes`.

Doc/library/compileall.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ runtime.
148148
Public functions
149149
----------------
150150

151-
.. function:: compile_dir(dir, maxlevels=sys.getrecursionlimit(), ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1, invalidation_mode=None, \*, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False)
151+
.. function:: compile_dir(dir, maxlevels=sys.getrecursionlimit(), ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1, invalidation_mode=None, *, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False)
152152

153153
Recursively descend the directory tree named by *dir*, compiling all :file:`.py`
154154
files along the way. Return a true value if all the files compiled successfully,
@@ -231,7 +231,7 @@ Public functions
231231
Added *stripdir*, *prependdir*, *limit_sl_dest* and *hardlink_dupes* arguments.
232232
Default value of *maxlevels* was changed from ``10`` to ``sys.getrecursionlimit()``
233233

234-
.. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, invalidation_mode=None, \*, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False)
234+
.. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, invalidation_mode=None, *, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False)
235235

236236
Compile the file with path *fullname*. Return a true value if the file
237237
compiled successfully, and a false value otherwise.

Doc/library/concurrent.futures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Executor Objects
6767
.. versionchanged:: 3.5
6868
Added the *chunksize* argument.
6969

70-
.. method:: shutdown(wait=True, \*, cancel_futures=False)
70+
.. method:: shutdown(wait=True, *, cancel_futures=False)
7171

7272
Signal the executor that it should free any resources that it is using
7373
when the currently pending futures are done executing. Calls to

0 commit comments

Comments
 (0)