bpo-32362: Fix references to non-existent multiprocessing.Connection(… · python/cpython@cebce2e

@@ -735,8 +735,9 @@ For an example of the usage of queues for interprocess communication see

735735736736

.. function:: Pipe([duplex])

737737738-

Returns a pair ``(conn1, conn2)`` of :class:`Connection` objects representing

739-

the ends of a pipe.

738+

Returns a pair ``(conn1, conn2)`` of

739+

:class:`~multiprocessing.connection.Connection` objects representing the

740+

ends of a pipe.

740741741742

If *duplex* is ``True`` (the default) then the pipe is bidirectional. If

742743

*duplex* is ``False`` then the pipe is unidirectional: ``conn1`` can only be

@@ -1021,10 +1022,13 @@ Miscellaneous

10211022

Connection Objects

10221023

~~~~~~~~~~~~~~~~~~

102310241025+

.. currentmodule:: multiprocessing.connection

1026+10241027

Connection objects allow the sending and receiving of picklable objects or

10251028

strings. They can be thought of as message oriented connected sockets.

102610291027-

Connection objects are usually created using :func:`Pipe` -- see also

1030+

Connection objects are usually created using

1031+

:func:`Pipe <multiprocessing.Pipe>` -- see also

10281032

:ref:`multiprocessing-listeners-clients`.

1029103310301034

.. class:: Connection

@@ -1159,6 +1163,8 @@ For example:

11591163

Synchronization primitives

11601164

~~~~~~~~~~~~~~~~~~~~~~~~~~

116111651166+

.. currentmodule:: multiprocessing

1167+11621168

Generally synchronization primitives are not as necessary in a multiprocess

11631169

program as they are in a multithreaded program. See the documentation for

11641170

:mod:`threading` module.

@@ -2269,7 +2275,7 @@ Listeners and Clients

22692275

:synopsis: API for dealing with sockets.

2270227622712277

Usually message passing between processes is done using queues or by using

2272-

:class:`~multiprocessing.Connection` objects returned by

2278+

:class:`~Connection` objects returned by

22732279

:func:`~multiprocessing.Pipe`.

2274228022752281

However, the :mod:`multiprocessing.connection` module allows some extra

@@ -2299,7 +2305,7 @@ multiple connections at the same time.

22992305

.. function:: Client(address[, family[, authkey]])

2300230623012307

Attempt to set up a connection to the listener which is using address

2302-

*address*, returning a :class:`~multiprocessing.Connection`.

2308+

*address*, returning a :class:`~Connection`.

2303230923042310

The type of the connection is determined by *family* argument, but this can

23052311

generally be omitted since it can usually be inferred from the format of

@@ -2349,8 +2355,8 @@ multiple connections at the same time.

23492355

.. method:: accept()

2350235623512357

Accept a connection on the bound socket or named pipe of the listener

2352-

object and return a :class:`~multiprocessing.Connection` object. If

2353-

authentication is attempted and fails, then

2358+

object and return a :class:`~Connection` object.

2359+

If authentication is attempted and fails, then

23542360

:exc:`~multiprocessing.AuthenticationError` is raised.

2355236123562362

.. method:: close()

@@ -2386,7 +2392,7 @@ multiple connections at the same time.

23862392

For both Unix and Windows, an object can appear in *object_list* if

23872393

it is

238823942389-

* a readable :class:`~multiprocessing.Connection` object;

2395+

* a readable :class:`~multiprocessing.connection.Connection` object;

23902396

* a connected and readable :class:`socket.socket` object; or

23912397

* the :attr:`~multiprocessing.Process.sentinel` attribute of a

23922398

:class:`~multiprocessing.Process` object.

@@ -2509,10 +2515,10 @@ an ``'AF_PIPE'`` address rather than an ``'AF_UNIX'`` address.

25092515

Authentication keys

25102516

~~~~~~~~~~~~~~~~~~~

251125172512-

When one uses :meth:`Connection.recv <multiprocessing.Connection.recv>`, the

2518+

When one uses :meth:`Connection.recv <Connection.recv>`, the

25132519

data received is automatically

2514-

unpickled. Unfortunately unpickling data from an untrusted source is a security

2515-

risk. Therefore :class:`Listener` and :func:`Client` use the :mod:`hmac` module

2520+

unpickled. Unfortunately unpickling data from an untrusted source is a security

2521+

risk. Therefore :class:`Listener` and :func:`Client` use the :mod:`hmac` module

25162522

to provide digest authentication.

2517252325182524

An authentication key is a byte string which can be thought of as a