bpo-31965: fix doc for multiprocessing.connection.Client and Listener#4304
Conversation
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.
|
I think this doesn't need a NEWS entry, but happy to add one if needed. |
Adds additional public members based on https://github.com/python/cpython/blob/master/Lib/multiprocessing/connection.py#L10 and https://docs.python.org/3/library/multiprocessing.html#multiprocessing-listeners-clients. I found some discrepancies in the docs while adding these stubs and filed python/cpython#4304 to address them.
| If authentication fails then | ||
| :exc:`~multiprocessing.AuthenticationError` is raised. See | ||
| :ref:`multiprocessing-auth-keys`. | ||
| If *authkey* is a byte string, digest authentication is used. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
Thank you @JelleZijlstra ! |
|
Thanks for the quick review! |
|
Thanks @JelleZijlstra for the PR, and @pitrou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6. |
…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)
|
GH-4321 is a backport of this pull request to the 3.6 branch. |
…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)
…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.
Adds additional public members based on https://github.com/python/cpython/blob/master/Lib/multiprocessing/connection.py#L10 and https://docs.python.org/3/library/multiprocessing.html#multiprocessing-listeners-clients. I found some discrepancies in the docs while adding these stubs and filed python/cpython#4304 to address them.
The authenticate argument does not exist on either Client or Listener:
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.
https://bugs.python.org/issue31965