[doc] Fix erroneous backslashes in signatures and names (GH-23658)
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.
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index 73ada0e..45e5843 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -210,7 +210,7 @@
Running an asyncio Program
==========================
-.. function:: run(coro, \*, debug=False)
+.. function:: run(coro, *, debug=False)
Execute the :term:`coroutine` *coro* and return the result.
@@ -247,7 +247,7 @@
Creating Tasks
==============
-.. function:: create_task(coro, \*, name=None)
+.. function:: create_task(coro, *, name=None)
Wrap the *coro* :ref:`coroutine <coroutine>` into a :class:`Task`
and schedule its execution. Return the Task object.
@@ -316,7 +316,7 @@
Running Tasks Concurrently
==========================
-.. awaitablefunction:: gather(\*aws, return_exceptions=False)
+.. awaitablefunction:: gather(*aws, return_exceptions=False)
Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
sequence *concurrently*.
@@ -488,7 +488,7 @@
Waiting Primitives
==================
-.. coroutinefunction:: wait(aws, \*, timeout=None, return_when=ALL_COMPLETED)
+.. coroutinefunction:: wait(aws, *, timeout=None, return_when=ALL_COMPLETED)
Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
iterable concurrently and block until the condition specified
@@ -573,7 +573,7 @@
deprecated.
-.. function:: as_completed(aws, \*, timeout=None)
+.. function:: as_completed(aws, *, timeout=None)
Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
iterable concurrently. Return an iterator of coroutines.
@@ -593,7 +593,7 @@
Running in Threads
==================
-.. coroutinefunction:: to_thread(func, /, \*args, \*\*kwargs)
+.. coroutinefunction:: to_thread(func, /, *args, **kwargs)
Asynchronously run function *func* in a separate thread.
@@ -723,7 +723,7 @@
Task Object
===========
-.. class:: Task(coro, \*, loop=None, name=None)
+.. class:: Task(coro, *, loop=None, name=None)
A :class:`Future-like <Future>` object that runs a Python
:ref:`coroutine <coroutine>`. Not thread-safe.
@@ -889,7 +889,7 @@
See the documentation of :meth:`Future.remove_done_callback`
for more details.
- .. method:: get_stack(\*, limit=None)
+ .. method:: get_stack(*, limit=None)
Return the list of stack frames for this Task.
@@ -910,7 +910,7 @@
stack are returned, but the oldest frames of a traceback are
returned. (This matches the behavior of the traceback module.)
- .. method:: print_stack(\*, limit=None, file=None)
+ .. method:: print_stack(*, limit=None, file=None)
Print the stack or traceback for this Task.