Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cebce2e

Browse filesBrowse files
bpo-32362: Fix references to non-existent multiprocessing.Connection() (GH-6223)
(cherry picked from commit 9f3535c) Co-authored-by: Bo Bayles <bbayles@gmail.com>
1 parent e57d3e3 commit cebce2e
Copy full SHA for cebce2e

File tree

Expand file treeCollapse file tree

1 file changed

+17
-11
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+17
-11
lines changed

‎Doc/library/multiprocessing.rst

Copy file name to clipboardExpand all lines: Doc/library/multiprocessing.rst
+17-11Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -735,8 +735,9 @@ For an example of the usage of queues for interprocess communication see
735735

736736
.. function:: Pipe([duplex])
737737

738-
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.
740741

741742
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
~~~~~~~~~~~~~~~~~~
10231024

1025+
.. 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.
10261029

1027-
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`.
10291033

10301034
.. class:: Connection
@@ -1159,6 +1163,8 @@ For example:
11591163
Synchronization primitives
11601164
~~~~~~~~~~~~~~~~~~~~~~~~~~
11611165

1166+
.. 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.
22702276

22712277
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`.
22742280

22752281
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]])
23002306

23012307
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`.
23032309

23042310
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()
23502356

23512357
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.
23552361

23562362
.. 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
23882394

2389-
* 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
~~~~~~~~~~~~~~~~~~~
25112517

2512-
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.
25172523

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.