gh-115664: Fix versionadded and versionchanged directives in multiprocessing.rst (GH-115665)

This commit is contained in:
Serhiy Storchaka 2024-02-19 20:03:42 +02:00 committed by GitHub
parent b02ab65e80
commit 8f602981ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 15 deletions

View File

@ -150,18 +150,18 @@ to start a process. These *start methods* are
over Unix pipes such as Linux. over Unix pipes such as Linux.
.. versionchanged:: 3.8
On macOS, the *spawn* start method is now the default. The *fork* start
method should be considered unsafe as it can lead to crashes of the
subprocess as macOS system libraries may start threads. See :issue:`33725`.
.. versionchanged:: 3.4 .. versionchanged:: 3.4
*spawn* added on all POSIX platforms, and *forkserver* added for *spawn* added on all POSIX platforms, and *forkserver* added for
some POSIX platforms. some POSIX platforms.
Child processes no longer inherit all of the parents inheritable Child processes no longer inherit all of the parents inheritable
handles on Windows. handles on Windows.
.. versionchanged:: 3.8
On macOS, the *spawn* start method is now the default. The *fork* start
method should be considered unsafe as it can lead to crashes of the
subprocess as macOS system libraries may start threads. See :issue:`33725`.
On POSIX using the *spawn* or *forkserver* start methods will also On POSIX using the *spawn* or *forkserver* start methods will also
start a *resource tracker* process which tracks the unlinked named start a *resource tracker* process which tracks the unlinked named
system resources (such as named semaphores or system resources (such as named semaphores or
@ -519,7 +519,7 @@ The :mod:`multiprocessing` package mostly replicates the API of the
to the process. to the process.
.. versionchanged:: 3.3 .. versionchanged:: 3.3
Added the *daemon* argument. Added the *daemon* parameter.
.. method:: run() .. method:: run()
@ -1245,8 +1245,7 @@ Connection objects are usually created using
Connection objects themselves can now be transferred between processes Connection objects themselves can now be transferred between processes
using :meth:`Connection.send` and :meth:`Connection.recv`. using :meth:`Connection.send` and :meth:`Connection.recv`.
.. versionadded:: 3.3 Connection objects also now support the context management protocol -- see
Connection objects now support the context management protocol -- see
:ref:`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the :ref:`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the
connection object, and :meth:`~contextmanager.__exit__` calls :meth:`close`. connection object, and :meth:`~contextmanager.__exit__` calls :meth:`close`.
@ -2250,11 +2249,11 @@ with the :class:`Pool` class.
as CPython does not assure that the finalizer of the pool will be called as CPython does not assure that the finalizer of the pool will be called
(see :meth:`object.__del__` for more information). (see :meth:`object.__del__` for more information).
.. versionadded:: 3.2 .. versionchanged:: 3.2
*maxtasksperchild* Added the *maxtasksperchild* parameter.
.. versionadded:: 3.4 .. versionchanged:: 3.4
*context* Added the *context* parameter.
.. versionchanged:: 3.13 .. versionchanged:: 3.13
*processes* uses :func:`os.process_cpu_count` by default, instead of *processes* uses :func:`os.process_cpu_count` by default, instead of
@ -2380,7 +2379,7 @@ with the :class:`Pool` class.
Wait for the worker processes to exit. One must call :meth:`close` or Wait for the worker processes to exit. One must call :meth:`close` or
:meth:`terminate` before using :meth:`join`. :meth:`terminate` before using :meth:`join`.
.. versionadded:: 3.3 .. versionchanged:: 3.3
Pool objects now support the context management protocol -- see Pool objects now support the context management protocol -- see
:ref:`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the :ref:`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the
pool object, and :meth:`~contextmanager.__exit__` calls :meth:`terminate`. pool object, and :meth:`~contextmanager.__exit__` calls :meth:`terminate`.
@ -2549,7 +2548,7 @@ multiple connections at the same time.
The address from which the last accepted connection came. If this is The address from which the last accepted connection came. If this is
unavailable then it is ``None``. unavailable then it is ``None``.
.. versionadded:: 3.3 .. versionchanged:: 3.3
Listener objects now support the context management protocol -- see Listener objects now support the context management protocol -- see
:ref:`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the :ref:`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the
listener object, and :meth:`~contextmanager.__exit__` calls :meth:`close`. listener object, and :meth:`~contextmanager.__exit__` calls :meth:`close`.