Skip to content

bpo-31965: fix doc for multiprocessing.connection.Client and Listener#4304

Merged
pitrou merged 3 commits into
python:masterfrom
JelleZijlstra:patch-1
Nov 7, 2017
Merged

bpo-31965: fix doc for multiprocessing.connection.Client and Listener#4304
pitrou merged 3 commits into
python:masterfrom
JelleZijlstra:patch-1

Conversation

@JelleZijlstra
Copy link
Copy Markdown
Member

@JelleZijlstra JelleZijlstra commented Nov 7, 2017

The authenticate argument does not exist on either Client or Listener:

Also made some small changes to vary sentence structure.

https://bugs.python.org/issue31965

The authenticate argument does not exist on either Client or Listener:
- https://github.com/python/cpython/blob/master/Lib/multiprocessing/connection.py#L483 (master)
- https://github.com/python/cpython/blob/3.6/Lib/multiprocessing/connection.py#L478 (3.6)
- https://github.com/python/cpython/blob/3.5/Lib/multiprocessing/connection.py#L478 (3.5)
- https://github.com/python/cpython/blob/3.4/Lib/multiprocessing/connection.py#L487 (3.4)
The documentation also claimed that these functions will call `current_process().auth_key`, for which I could find no evidence in the code. I rewrote the documentation to reflect the actual behavior.

Also made some small changes to vary sentence structure.
@JelleZijlstra JelleZijlstra changed the title fix doc for multiprocessing.connection.Client and Listener bpo-31965: fix doc for multiprocessing.connection.Client and Listener Nov 7, 2017
@JelleZijlstra
Copy link
Copy Markdown
Member Author

I think this doesn't need a NEWS entry, but happy to add one if needed.

JelleZijlstra added a commit to python/typeshed that referenced this pull request Nov 7, 2017
Comment thread Doc/library/multiprocessing.rst Outdated
If authentication fails then
:exc:`~multiprocessing.AuthenticationError` is raised. See
:ref:`multiprocessing-auth-keys`.
If *authkey* is a byte string, digest authentication is used.
Copy link
Copy Markdown
Member

@pitrou pitrou Nov 7, 2017

Choose a reason for hiding this comment

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

I'd like to suggest an improvement: If *authkey* is given and not None, it should be a byte string and will be used as the secret key for an authentication challenge.

Also how about improving the multiprocessing-auth-keys section to mention the challenge is HMAC-based?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I reworded both sections (for Client and Listener) to use that sentence.

Also, multiprocessing-auth-keys already mentions HMAC; I added it to the Client and Listener docs.

@pitrou
Copy link
Copy Markdown
Member

pitrou commented Nov 7, 2017

Thank you @JelleZijlstra !

@pitrou pitrou merged commit 1e5d54c into python:master Nov 7, 2017
@JelleZijlstra
Copy link
Copy Markdown
Member Author

Thanks for the quick review!

@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @JelleZijlstra for the PR, and @pitrou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 7, 2017
…pythonGH-4304)

* fix doc for multiprocessing.connection.Client

The authenticate argument does not exist on either Client or Listener:
- https://github.com/python/cpython/blob/master/Lib/multiprocessing/connection.pyGH-L483 (master)
- https://github.com/python/cpython/blob/3.6/Lib/multiprocessing/connection.pyGH-L478 (3.6)
- https://github.com/python/cpython/blob/3.5/Lib/multiprocessing/connection.pyGH-L478 (3.5)
- https://github.com/python/cpython/blob/3.4/Lib/multiprocessing/connection.pyGH-L487 (3.4)
The documentation also claimed that these functions will call `current_process().auth_key`, for which I could find no evidence in the code. I rewrote the documentation to reflect the actual behavior.

Also made some small changes to vary sentence structure.
(cherry picked from commit 1e5d54c)
@bedevere-bot
Copy link
Copy Markdown

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

pitrou pushed a commit that referenced this pull request Nov 7, 2017
…GH-4304) (#4321)

* fix doc for multiprocessing.connection.Client

The authenticate argument does not exist on either Client or Listener:
- https://github.com/python/cpython/blob/master/Lib/multiprocessing/connection.pyGH-L483 (master)
- https://github.com/python/cpython/blob/3.6/Lib/multiprocessing/connection.pyGH-L478 (3.6)
- https://github.com/python/cpython/blob/3.5/Lib/multiprocessing/connection.pyGH-L478 (3.5)
- https://github.com/python/cpython/blob/3.4/Lib/multiprocessing/connection.pyGH-L487 (3.4)
The documentation also claimed that these functions will call `current_process().auth_key`, for which I could find no evidence in the code. I rewrote the documentation to reflect the actual behavior.

Also made some small changes to vary sentence structure.
(cherry picked from commit 1e5d54c)
embray pushed a commit to embray/cpython that referenced this pull request Nov 9, 2017
…python#4304)

* fix doc for multiprocessing.connection.Client

The authenticate argument does not exist on either Client or Listener:
- https://github.com/python/cpython/blob/master/Lib/multiprocessing/connection.py#L483 (master)
- https://github.com/python/cpython/blob/3.6/Lib/multiprocessing/connection.py#L478 (3.6)
- https://github.com/python/cpython/blob/3.5/Lib/multiprocessing/connection.py#L478 (3.5)
- https://github.com/python/cpython/blob/3.4/Lib/multiprocessing/connection.py#L487 (3.4)
The documentation also claimed that these functions will call `current_process().auth_key`, for which I could find no evidence in the code. I rewrote the documentation to reflect the actual behavior.

Also made some small changes to vary sentence structure.
matthiaskramm pushed a commit to python/typeshed that referenced this pull request Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants