Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-32362: Fix references to non-existent multiprocessing.Connection() #6223

Merged
merged 4 commits into from
Apr 29, 2018

Conversation

bbayles
Copy link
Contributor

@bbayles bbayles commented Mar 25, 2018

This PR fixes references to multiprocessing.Connection() in the multiprocessing docs - they should be multiprocessing.connection.Connection().

We set the module currentmodule directive such that Sphinx renders the class name correctly (here), but since module:: multiprocessing.connection is already used once (here) , we also set noindex to avoid messing with the document structure.

https://bugs.python.org/issue32362

@serhiy-storchaka
Copy link
Member

Would the currentmodule directive be helped here?

@bbayles
Copy link
Contributor Author

bbayles commented Mar 27, 2018

Good suggestion. That directive is aimed at this issue; I've made that change.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

Thank you. But such minor documentation changes usually don't need a news entry.

@serhiy-storchaka serhiy-storchaka added needs backport to 3.6 docs Documentation in the Doc dir labels Mar 28, 2018
@bbayles
Copy link
Contributor Author

bbayles commented Mar 28, 2018

Shall I remove the news entry? I put it in because I thought the bedevere-bot would issue me a red check mark.

@serhiy-storchaka
Copy link
Member

This warning can be silenced.

@bbayles
Copy link
Contributor Author

bbayles commented Mar 28, 2018

Right-o.

@@ -2269,7 +2274,7 @@ Listeners and Clients
:synopsis: API for dealing with sockets.

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

Choose a reason for hiding this comment

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

Can be just :class:`Connection`.

@@ -2299,7 +2304,7 @@ multiple connections at the same time.
.. function:: Client(address[, family[, authkey]])

Attempt to set up a connection to the listener which is using address
*address*, returning a :class:`~multiprocessing.Connection`.
*address*, returning a :class:`~multiprocessing.connection.Connection`.
Copy link
Member

Choose a reason for hiding this comment

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

Can be just :class:`Connection`.

@@ -2349,8 +2354,8 @@ multiple connections at the same time.
.. method:: accept()

Accept a connection on the bound socket or named pipe of the listener
object and return a :class:`~multiprocessing.Connection` object. If
authentication is attempted and fails, then
object and return a :class:`~multiprocessing.connection.Connection` object.
Copy link
Member

Choose a reason for hiding this comment

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

Can be just :class:`Connection`.

@@ -2509,8 +2514,8 @@ an ``'AF_PIPE'`` address rather than an ``'AF_UNIX'`` address.
Authentication keys
~~~~~~~~~~~~~~~~~~~

When one uses :meth:`Connection.recv <multiprocessing.Connection.recv>`, the
data received is automatically
When one uses :meth:`Connection.recv <multiprocessing.connection.Connection.recv>`,
Copy link
Member

Choose a reason for hiding this comment

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

Can be just :meth:`Connection.recv`.

@@ -1021,6 +1022,8 @@ Miscellaneous
Connection Objects
~~~~~~~~~~~~~~~~~~

.. currentmodule:: multiprocessing.connection
Copy link
Member

Choose a reason for hiding this comment

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

In the line below

Therefore, unless the connection object was produced using :func:`Pipe` you

:func:`Pipe` is not converted to a link because the current module is multiprocessing.connection.

@bbayles
Copy link
Contributor Author

bbayles commented Mar 29, 2018

Thanks for looking over this. I've incorporated your suggestions.

@serhiy-storchaka
Copy link
Member

Thank you for your contribution @bbayles!

@serhiy-storchaka serhiy-storchaka merged commit 9f3535c into python:master Apr 29, 2018
@miss-islington
Copy link
Contributor

Thanks @bbayles for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 29, 2018
pythonGH-6223)

(cherry picked from commit 9f3535c)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
@bedevere-bot
Copy link

GH-6639 is a backport of this pull request to the 3.7 branch.

@miss-islington
Copy link
Contributor

Sorry, @bbayles and @serhiy-storchaka, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 9f3535c9cde8813ce631d6ebe4d790682f594828 2.7

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 29, 2018
pythonGH-6223)

(cherry picked from commit 9f3535c)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
@bedevere-bot
Copy link

GH-6640 is a backport of this pull request to the 3.6 branch.

miss-islington added a commit that referenced this pull request Apr 29, 2018
GH-6223)

(cherry picked from commit 9f3535c)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
miss-islington added a commit that referenced this pull request Apr 29, 2018
GH-6223)

(cherry picked from commit 9f3535c)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
@bbayles
Copy link
Contributor Author

bbayles commented Apr 29, 2018

Many thanks for the guidance on this, @serhiy-storchaka . While you've got the multiprocessing docs in your mind, PR #5850 is another addition that may be worth a look?

bbayles added a commit to bbayles/cpython that referenced this pull request Apr 29, 2018
…ction() (pythonGH-6223).

(cherry picked from commit 9f3535c)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
@bedevere-bot
Copy link

GH-6646 is a backport of this pull request to the 2.7 branch.

serhiy-storchaka pushed a commit that referenced this pull request May 5, 2018
…ction() (GH-6223) (GH-6646)

(cherry picked from commit 9f3535c)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants