Skip to content

Commit 4a1bc26

Browse files
bbaylesserhiy-storchaka
authored andcommitted
[2.7] bpo-32362: Fix references to non-existent multiprocessing.Connection() (GH-6223) (GH-6646)
(cherry picked from commit 9f3535c) Co-authored-by: Bo Bayles <bbayles@gmail.com>
1 parent 6d3d02c commit 4a1bc26

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

Doc/library/multiprocessing.rst

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -803,10 +803,13 @@ Miscellaneous
803803
Connection Objects
804804
~~~~~~~~~~~~~~~~~~
805805

806+
.. currentmodule:: None
807+
806808
Connection objects allow the sending and receiving of picklable objects or
807809
strings. They can be thought of as message oriented connected sockets.
808810

809-
Connection objects are usually created using :func:`Pipe` -- see also
811+
Connection objects are usually created using
812+
:func:`Pipe <multiprocessing.Pipe>` -- see also
810813
:ref:`multiprocessing-listeners-clients`.
811814

812815
.. class:: Connection
@@ -926,6 +929,8 @@ For example:
926929
Synchronization primitives
927930
~~~~~~~~~~~~~~~~~~~~~~~~~~
928931

932+
.. currentmodule:: multiprocessing
933+
929934
Generally synchronization primitives are not as necessary in a multiprocess
930935
program as they are in a multithreaded program. See the documentation for
931936
:mod:`threading` module.
@@ -1943,8 +1948,7 @@ Listeners and Clients
19431948
:synopsis: API for dealing with sockets.
19441949

19451950
Usually message passing between processes is done using queues or by using
1946-
:class:`~multiprocessing.Connection` objects returned by
1947-
:func:`~multiprocessing.Pipe`.
1951+
:class:`Connection` objects returned by :func:`~multiprocessing.Pipe`.
19481952

19491953
However, the :mod:`multiprocessing.connection` module allows some extra
19501954
flexibility. It basically gives a high level message oriented API for dealing
@@ -1972,7 +1976,7 @@ authentication* using the :mod:`hmac` module.
19721976
.. function:: Client(address[, family[, authenticate[, authkey]]])
19731977

19741978
Attempt to set up a connection to the listener which is using address
1975-
*address*, returning a :class:`~multiprocessing.Connection`.
1979+
*address*, returning a :class:`Connection`.
19761980

19771981
The type of the connection is determined by *family* argument, but this can
19781982
generally be omitted since it can usually be inferred from the format of
@@ -2028,8 +2032,8 @@ authentication* using the :mod:`hmac` module.
20282032
.. method:: accept()
20292033

20302034
Accept a connection on the bound socket or named pipe of the listener
2031-
object and return a :class:`~multiprocessing.Connection` object. If
2032-
authentication is attempted and fails, then
2035+
object and return a :class:`Connection` object.
2036+
If authentication is attempted and fails, then
20332037
:exc:`~multiprocessing.AuthenticationError` is raised.
20342038

20352039
.. method:: close()
@@ -2139,7 +2143,7 @@ an ``'AF_PIPE'`` address rather than an ``'AF_UNIX'`` address.
21392143
Authentication keys
21402144
~~~~~~~~~~~~~~~~~~~
21412145

2142-
When one uses :meth:`Connection.recv <multiprocessing.Connection.recv>`, the
2146+
When one uses :meth:`Connection.recv`, the
21432147
data received is automatically
21442148
unpickled. Unfortunately unpickling data from an untrusted source is a security
21452149
risk. Therefore :class:`Listener` and :func:`Client` use the :mod:`hmac` module

0 commit comments

Comments
 (0)