[2.7] bpo-32362: Fix references to non-existent multiprocessing.Connection() (GH-6223) by bbayles · Pull Request #6646 · python/cpython

@bbayles

@bbayles

…ction() (pythonGH-6223).

(cherry picked from commit 9f3535c)

Co-authored-by: Bo Bayles <bbayles@gmail.com>

@bbayles

@serhiy-storchaka

Thank you for your backport @bbayles. But things are more complex in 2.7. multiprocessing.Connection is not existing as well as multiprocessing.connection.Connection.

@bbayles

Ah, you are quite right. I see now how the Python 3 docs got to be the way they are.

_multiprocessing.Connection does exist, but I suspect it's not useful to document that.

I think the simplest change would be to change the reference to multiprocessing.Connection here:
image

to simply Connection?

@bbayles

@bbayles

I think I've done that by un-setting the currentmodule. The links seem to work right when I build the docs locally.

@bbayles

serhiy-storchaka

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what is the bests solution here. Removing the multiprocessing. looks like an improvement.

Returns a pair ``(conn1, conn2)`` of :class:`Connection` objects representing
the ends of a pipe.
Returns a pair ``(conn1, conn2)`` of :class:`Connection` objects
representing the ends of a pipe.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unneeded change.


Usually message passing between processes is done using queues or by using
:class:`~multiprocessing.Connection` objects returned by
:class:`~Connection` objects returned by

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~ is not needed.

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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just :meth:`Connection.recv`.

data received is automatically
unpickled. Unfortunately unpickling data from an untrusted source is a security
risk. Therefore :class:`Listener` and :func:`Client` use the :mod:`hmac` module
unpickled. Unfortunately unpickling data from an untrusted source is a security

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unneeded (and unwanted) changes.

:func:`Pipe <multiprocessing.Pipe>` -- see also
:ref:`multiprocessing-listeners-clients`.

.. class:: Connection

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add the :noindex: option?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this breaks the links, e.g. here:


image


I doubt that's desirable?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I wanted just exclude it from the index, but seems this doesn't work this way.

@bbayles

@bbayles

OK, thanks. I've changed those things.

@bbayles

@bbayles

@bbayles

Er, it seems I pushed the wrong thing - apologies.

serhiy-storchaka

:func:`Pipe <multiprocessing.Pipe>` -- see also
:ref:`multiprocessing-listeners-clients`.

.. class:: Connection

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I wanted just exclude it from the index, but seems this doesn't work this way.