summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorYurii Karabas <1998uriyyo@gmail.com>2020-11-29 12:50:57 (GMT)
committerGitHub <noreply@github.com>2020-11-29 12:50:57 (GMT)
commit86150d39c888579b65841f4391d054b7b3eff9f2 (patch)
tree9f240380bed2fb7eea2a409fecb7cc6a566cfb2a /Doc
parentc642374b3ef72f6f300616f07aea2a3f9ed83e51 (diff)
downloadcpython-86150d39c888579b65841f4391d054b7b3eff9f2.zip
cpython-86150d39c888579b65841f4391d054b7b3eff9f2.tar.gz
cpython-86150d39c888579b65841f4391d054b7b3eff9f2.tar.bz2
bpo-42392: Remove deprecated loop parameter from docs (GH-23552)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/asyncio-queue.rst5
-rw-r--r--Doc/library/asyncio-stream.rst23
-rw-r--r--Doc/library/asyncio-subprocess.rst13
-rw-r--r--Doc/library/asyncio-sync.rst29
-rw-r--r--Doc/library/asyncio-task.rst32
5 files changed, 22 insertions, 80 deletions
diff --git a/Doc/library/asyncio-queue.rst b/Doc/library/asyncio-queue.rst
index 524560b..289ad1b 100644
--- a/Doc/library/asyncio-queue.rst
+++ b/Doc/library/asyncio-queue.rst
@@ -23,7 +23,7 @@ See also the `Examples`_ section below.
Queue
=====
-.. class:: Queue(maxsize=0, \*, loop=None)
+.. class:: Queue(maxsize=0)
A first in, first out (FIFO) queue.
@@ -36,9 +36,6 @@ Queue
the queue is always known and can be returned by calling the
:meth:`qsize` method.
- .. deprecated-removed:: 3.8 3.10
- The *loop* parameter.
-
This class is :ref:`not thread safe <asyncio-multithreading>`.
diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst
index b76ed37..bee47bc 100644
--- a/Doc/library/asyncio-stream.rst
+++ b/Doc/library/asyncio-stream.rst
@@ -49,8 +49,8 @@ and work with streams:
.. coroutinefunction:: open_connection(host=None, port=None, \*, \
- loop=None, limit=None, ssl=None, family=0, \
- proto=0, flags=0, sock=None, local_addr=None, \
+ limit=None, ssl=None, family=0, proto=0, \
+ flags=0, sock=None, local_addr=None, \
server_hostname=None, ssl_handshake_timeout=None)
Establish a network connection and return a pair of
@@ -59,9 +59,6 @@ and work with streams:
The returned *reader* and *writer* objects are instances of
:class:`StreamReader` and :class:`StreamWriter` classes.
- The *loop* argument is optional and can always be determined
- automatically when this function is awaited from a coroutine.
-
*limit* determines the buffer size limit used by the
returned :class:`StreamReader` instance. By default the *limit*
is set to 64 KiB.
@@ -74,7 +71,7 @@ and work with streams:
The *ssl_handshake_timeout* parameter.
.. coroutinefunction:: start_server(client_connected_cb, host=None, \
- port=None, \*, loop=None, limit=None, \
+ port=None, \*, limit=None, \
family=socket.AF_UNSPEC, \
flags=socket.AI_PASSIVE, sock=None, \
backlog=100, ssl=None, reuse_address=None, \
@@ -92,9 +89,6 @@ and work with streams:
:ref:`coroutine function <coroutine>`; if it is a coroutine function,
it will be automatically scheduled as a :class:`Task`.
- The *loop* argument is optional and can always be determined
- automatically when this method is awaited from a coroutine.
-
*limit* determines the buffer size limit used by the
returned :class:`StreamReader` instance. By default the *limit*
is set to 64 KiB.
@@ -109,9 +103,9 @@ and work with streams:
.. rubric:: Unix Sockets
-.. coroutinefunction:: open_unix_connection(path=None, \*, loop=None, \
- limit=None, ssl=None, sock=None, \
- server_hostname=None, ssl_handshake_timeout=None)
+.. coroutinefunction:: open_unix_connection(path=None, \*, limit=None, \
+ ssl=None, sock=None, server_hostname=None, \
+ ssl_handshake_timeout=None)
Establish a Unix socket connection and return a pair of
``(reader, writer)``.
@@ -132,9 +126,8 @@ and work with streams:
.. coroutinefunction:: start_unix_server(client_connected_cb, path=None, \
- \*, loop=None, limit=None, sock=None, \
- backlog=100, ssl=None, ssl_handshake_timeout=None, \
- start_serving=True)
+ \*, limit=None, sock=None, backlog=100, ssl=None, \
+ ssl_handshake_timeout=None, start_serving=True)
Start a Unix socket server.
diff --git a/Doc/library/asyncio-subprocess.rst b/Doc/library/asyncio-subprocess.rst
index b033034..ea67430 100644
--- a/Doc/library/asyncio-subprocess.rst
+++ b/Doc/library/asyncio-subprocess.rst
@@ -62,8 +62,7 @@ Creating Subprocesses
=====================
.. coroutinefunction:: create_subprocess_exec(program, \*args, stdin=None, \
- stdout=None, stderr=None, loop=None, \
- limit=None, \*\*kwds)
+ stdout=None, stderr=None, limit=None, \*\*kwds)
Create a subprocess.
@@ -76,13 +75,9 @@ Creating Subprocesses
See the documentation of :meth:`loop.subprocess_exec` for other
parameters.
- .. deprecated-removed:: 3.8 3.10
-
- The *loop* parameter.
.. coroutinefunction:: create_subprocess_shell(cmd, stdin=None, \
- stdout=None, stderr=None, loop=None, \
- limit=None, \*\*kwds)
+ stdout=None, stderr=None, limit=None, \*\*kwds)
Run the *cmd* shell command.
@@ -104,10 +99,6 @@ Creating Subprocesses
escape whitespace and special shell characters in strings that are going
to be used to construct shell commands.
- .. deprecated-removed:: 3.8 3.10
-
- The *loop* parameter.
-
.. note::
Subprocesses are available for Windows if a :class:`ProactorEventLoop` is
diff --git a/Doc/library/asyncio-sync.rst b/Doc/library/asyncio-sync.rst
index 84a52cb..a7688d5 100644
--- a/Doc/library/asyncio-sync.rst
+++ b/Doc/library/asyncio-sync.rst
@@ -36,7 +36,7 @@ asyncio has the following basic synchronization primitives:
Lock
====
-.. class:: Lock(\*, loop=None)
+.. class:: Lock()
Implements a mutex lock for asyncio tasks. Not thread-safe.
@@ -63,9 +63,6 @@ Lock
finally:
lock.release()
- .. deprecated-removed:: 3.8 3.10
- The *loop* parameter.
-
.. coroutinemethod:: acquire()
Acquire the lock.
@@ -96,7 +93,7 @@ Lock
Event
=====
-.. class:: Event(\*, loop=None)
+.. class:: Event()
An event object. Not thread-safe.
@@ -108,10 +105,6 @@ Event
:meth:`clear` method. The :meth:`wait` method blocks until the
flag is set to *true*. The flag is set to *false* initially.
-
- .. deprecated-removed:: 3.8 3.10
- The *loop* parameter.
-
.. _asyncio_example_sync_event:
Example::
@@ -166,7 +159,7 @@ Event
Condition
=========
-.. class:: Condition(lock=None, \*, loop=None)
+.. class:: Condition(lock=None)
A Condition object. Not thread-safe.
@@ -184,10 +177,6 @@ Condition
``None``. In the latter case a new Lock object is created
automatically.
-
- .. deprecated-removed:: 3.8 3.10
- The *loop* parameter.
-
The preferred way to use a Condition is an :keyword:`async with`
statement::
@@ -270,7 +259,7 @@ Condition
Semaphore
=========
-.. class:: Semaphore(value=1, \*, loop=None)
+.. class:: Semaphore(value=1)
A Semaphore object. Not thread-safe.
@@ -284,10 +273,6 @@ Semaphore
internal counter (``1`` by default). If the given value is
less than ``0`` a :exc:`ValueError` is raised.
-
- .. deprecated-removed:: 3.8 3.10
- The *loop* parameter.
-
The preferred way to use a Semaphore is an :keyword:`async with`
statement::
@@ -332,7 +317,7 @@ Semaphore
BoundedSemaphore
================
-.. class:: BoundedSemaphore(value=1, \*, loop=None)
+.. class:: BoundedSemaphore(value=1)
A bounded semaphore object. Not thread-safe.
@@ -340,10 +325,6 @@ BoundedSemaphore
a :exc:`ValueError` in :meth:`~Semaphore.release` if it
increases the internal counter above the initial *value*.
-
- .. deprecated-removed:: 3.8 3.10
- The *loop* parameter.
-
---------
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index c638f12..73ada0e 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -283,7 +283,7 @@ Creating Tasks
Sleeping
========
-.. coroutinefunction:: sleep(delay, result=None, \*, loop=None)
+.. coroutinefunction:: sleep(delay, result=None)
Block for *delay* seconds.
@@ -293,9 +293,6 @@ Sleeping
``sleep()`` always suspends the current task, allowing other tasks
to run.
- .. deprecated-removed:: 3.8 3.10
- The *loop* parameter.
-
.. _asyncio_example_sleep:
Example of coroutine displaying the current date every second
@@ -319,7 +316,7 @@ Sleeping
Running Tasks Concurrently
==========================
-.. awaitablefunction:: gather(\*aws, loop=None, return_exceptions=False)
+.. awaitablefunction:: gather(\*aws, return_exceptions=False)
Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
sequence *concurrently*.
@@ -348,9 +345,6 @@ Running Tasks Concurrently
cancellation of one submitted Task/Future to cause other
Tasks/Futures to be cancelled.
- .. deprecated-removed:: 3.8 3.10
- The *loop* parameter.
-
.. _asyncio_example_gather:
Example::
@@ -403,7 +397,7 @@ Running Tasks Concurrently
Shielding From Cancellation
===========================
-.. awaitablefunction:: shield(aw, \*, loop=None)
+.. awaitablefunction:: shield(aw)
Protect an :ref:`awaitable object <asyncio-awaitables>`
from being :meth:`cancelled <Task.cancel>`.
@@ -436,14 +430,11 @@ Shielding From Cancellation
except CancelledError:
res = None
- .. deprecated-removed:: 3.8 3.10
- The *loop* parameter.
-
Timeouts
========
-.. coroutinefunction:: wait_for(aw, timeout, \*, loop=None)
+.. coroutinefunction:: wait_for(aw, timeout)
Wait for the *aw* :ref:`awaitable <asyncio-awaitables>`
to complete with a timeout.
@@ -466,9 +457,6 @@ Timeouts
If the wait is cancelled, the future *aw* is also cancelled.
- .. deprecated-removed:: 3.8 3.10
- The *loop* parameter.
-
.. _asyncio_example_waitfor:
Example::
@@ -500,8 +488,7 @@ Timeouts
Waiting Primitives
==================
-.. coroutinefunction:: wait(aws, \*, loop=None, 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
@@ -553,10 +540,6 @@ Waiting Primitives
``wait()`` directly is deprecated as it leads to
:ref:`confusing behavior <asyncio_example_wait_coroutine>`.
- .. deprecated-removed:: 3.8 3.10
-
- The *loop* parameter.
-
.. _asyncio_example_wait_coroutine:
.. note::
@@ -590,7 +573,7 @@ Waiting Primitives
deprecated.
-.. function:: as_completed(aws, \*, loop=None, timeout=None)
+.. function:: as_completed(aws, \*, timeout=None)
Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
iterable concurrently. Return an iterator of coroutines.
@@ -600,9 +583,6 @@ Waiting Primitives
Raises :exc:`asyncio.TimeoutError` if the timeout occurs before
all Futures are done.
- .. deprecated-removed:: 3.8 3.10
- The *loop* parameter.
-
Example::
for coro in as_completed(aws):