8000 gh-121970: Replace `.. coroutine{method,function}` with `:async:` by sobolevn · Pull Request #130448 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-121970: Replace .. coroutine{method,function} with :async: #130448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 22, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed 8000 to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix problems
  • Loading branch information
AA-Turner committed Feb 22, 2025
commit d3efa3cdcf799516303a0c03c4042826894b513e
79 changes: 40 additions & 39 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,13 @@ Opening network connections
^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. method:: loop.create_connection(protocol_factory, \
host=None, port=None, *, ssl=None, \
family=0, proto=0, flags=0, sock=None, \
local_addr=None, server_hostname=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
happy_eyeballs_delay=None, interleave=None, \
all_errors=False)
host=None, port=None, *, ssl=None, \
family=0, proto=0, flags=0, sock=None, \
local_addr=None, server_hostname=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
happy_eyeballs_delay=None, interleave=None, \
all_errors=False)
:async:

Open a streaming transport connection to a given
Expand Down Expand Up @@ -561,10 +561,11 @@ Opening network connections
that can be used directly in async/await code.

.. method:: loop.create_datagram_endpoint(protocol_factory, \
local_addr=None, remote_addr=None, *, \
family=0, proto=0, flags=0, \
reuse_port=None, \
allow_broadcast=None, sock=None)
local_addr=None, remote_addr=None, *, \
family=0, proto=0, flags=0, \
reuse_port=None, \
allow_broadcast=None, sock=None)
:async:

Create a datagram connection.

Expand Down Expand Up @@ -646,9 +647,9 @@ Opening network connections
3.7.6 and 3.6.10, has been entirely removed.

.. method:: loop.create_unix_connection(protocol_factory, \
path=None, *, ssl=None, sock=None, \
server_hostname=None, ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None)
path=None, *, ssl=None, sock=None, \
server_hostname=None, ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None)
:async:

Create a Unix connection.
Expand Down Expand Up @@ -683,15 +684,15 @@ Creating network servers
.. _loop_create_server:

.. method:: loop.create_server(protocol_factory, \
host=None, port=None, *, \
family=socket.AF_UNSPEC, \
flags=socket.AI_PASSIVE, \
sock=None, backlog=100, ssl=None, \
reuse_address=None, reuse_port=None, \
keep_alive=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
start_serving=True)
host=None, port=None, *, \
family=socket.AF_UNSPEC, \
flags=socket.AI_PASSIVE, \
sock=None, backlog=100, ssl=None, \
reuse_address=None, reuse_port=None, \
keep_alive=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
start_serving=True)
:async:

Create a TCP server (socket type :const:`~socket.SOCK_STREAM`) listening
Expand Down Expand Up @@ -801,10 +802,10 @@ Creating network servers


.. method:: loop.create_unix_server(protocol_factory, path=None, \
*, sock=None, backlog=100, ssl=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
start_serving=True, cleanup_socket=True)
*, sock=None, backlog=100, ssl=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
start_serving=True, cleanup_socket=True)
:async:

Similar to :meth:`loop.create_server` but works with the
Expand Down Expand Up @@ -839,8 +840,8 @@ Creating network servers


.. method:: loop.connect_accepted_socket(protocol_factory, \
sock, *, ssl=None, ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None)
sock, *, ssl=None, ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None)
:async:

Wrap an already accepted connection into a transport/protocol pair.
Expand Down Expand Up @@ -890,7 +891,7 @@ Transferring files
^^^^^^^^^^^^^^^^^^

.. method:: loop.sendfile(transport, file, \
offset=0, count=None, *, fallback=True)
offset=0, count=None, *, fallback=True)
:async:

Send a *file* over a *transport*. Return the total number of bytes
Expand Down Expand Up @@ -921,9 +922,9 @@ TLS Upgrade
^^^^^^^^^^^

.. method:: loop.start_tls(transport, protocol, \
sslcontext, *, server_side=False, \
server_hostname=None, ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None)
sslcontext, *, server_side=False, \
server_hostname=None, ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None)
:async:

Upgrade an existing transport-based 8000 connection to TLS.
Expand Down Expand Up @@ -1148,7 +1149,7 @@ convenient.
:meth:`loop.create_server` and :func:`start_server`.

.. method:: loop.sock_sendfile(sock, file, offset=0, count=None, \
*, fallback=True)
*, fallback=True)
:async:

Send a file using high-performance :mod:`os.sendfile` if possible.
Expand Down Expand Up @@ -1184,7 +1185,7 @@ DNS
^^^

.. method:: loop.getaddrinfo(host, port, *, family=0, \
type=0, proto=0, flags=0)
type=0, proto=0, flags=0)
:async:

Asynchronous version of :meth:`socket.getaddrinfo`.
Expand Down Expand Up @@ -1503,8 +1504,8 @@ async/await code consider using the high-level
.. _loop_subprocess_exec:

.. method:: loop.subprocess_exec(protocol_factory, *args, \
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
stderr=subprocess.PIPE, **kwargs)
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
stderr=subprocess.PIPE, **kwargs)
:async:

Create a subprocess from one or more string arguments specified by
Expand Down Expand Up @@ -1586,8 +1587,8 @@ async/await code consider using the high-level
*protocol* is an object instantiated by the *protocol_factory*.

.. method:: loop.subprocess_shell(protocol_factory, cmd, *, \
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
stderr=subprocess.PIPE, **kwargs)
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
stderr=subprocess.PIPE, **kwargs)
:async:

Create a subprocess from *cmd*, which can be a :class:`str` or a
Expand Down
36 changes: 18 additions & 18 deletions Doc/library/asyncio-stream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ and work with streams:


.. function:: open_connection(host=None, port=None, *, \
limit=None, ssl=None, family=0, proto=0, \
flags=0, sock=None, local_addr=None, \
server_hostname=None, ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
happy_eyeballs_delay=None, interleave=None)
limit=None, ssl=None, family=0, proto=0, \
flags=0, sock=None, local_addr=None, \
server_hostname=None, ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
happy_eyeballs_delay=None, interleave=None)
:async:

Establish a network connection and return a pair of
Expand Down Expand Up @@ -89,13 +89,13 @@ and work with streams:


.. function:: start_server(client_connected_cb, host=None, \
port=None, *, limit=None, \
family=socket.AF_UNSPEC, \
flags=socket.AI_PASSIVE, sock=None, \
backlog=100, ssl=None, reuse_address=None, \
reuse_port=None, keep_alive=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, start_serving=True)
port=None, *, limit=None, \
family=socket.AF_UNSPEC, \
flags=socket.AI_PASSIVE, sock=None, \
backlog=100, ssl=None, reuse_address=None, \
reuse_port=None, keep_alive=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, start_serving=True)
:async:

Start a socket server.
Expand Down Expand Up @@ -138,8 +138,8 @@ and work with streams:
.. rubric:: Unix Sockets

.. function:: open_unix_connection(path=None, *, limit=None, \
ssl=None, sock=None, server_hostname=None, \
ssl_handshake_timeout=None, ssl_shutdown_timeout=None)
ssl=None, sock=None, server_hostname=None, \
ssl_handshake_timeout=None, ssl_shutdown_timeout=None)
:async:

Establish a Unix socket connection and return a pair of
Expand Down Expand Up @@ -169,9 +169,9 @@ and work with streams:


.. function:: start_unix_server(client_connected_cb, path=None, \
*, limit=None, sock=None, backlog=100, ssl=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, start_serving=True)
*, limit=None, sock=None, backlog=100, ssl=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, start_serving=True)
:async:

Start a Unix socket server.
Expand Down Expand Up @@ -372,7 +372,7 @@ StreamWriter
returns immediately.

.. method:: start_tls(sslcontext, *, server_hostname=None, \
ssl_handshake_timeout=None, ssl_shutdown_timeout=None)
ssl_handshake_timeout=None, ssl_shutdown_timeout=None)
:async:

Upgrade an existing stream-based connection to TLS.
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/asyncio-subprocess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Creating Subprocesses
=====================

.. function:: create_subprocess_exec(program, *args, stdin=None, \
stdout=None, stderr=None, limit=None, **kwds)
stdout=None, stderr=None, limit=None, **kwds)
:async:

Create a subprocess.
Expand All @@ -81,7 +81,7 @@ Creating Subprocesses


.. function:: create_subprocess_shell(cmd, stdin=None, \
stdout=None, stderr=None, limit=None, **kwds)
stdout=None, stderr=None, limit=None, **kwds)
:async:

Run the *cmd* shell command.
Expand Down
2 changes: 1 addition & 1 deletion Doc/reference/expressions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ which are used to control the execution of a generator function.


.. method:: agen.athrow(value)
agen.athrow(type[, value[, traceback]])
agen.athrow(type[, value[, traceback]])
:async:

Returns an awaitable that raises an exception of type ``type`` at the point
Expand Down
Loading
0