gh-134837: Correct and improve base85 documentation for base64 and binascii modules#145843
Conversation
|
This PR is stale because it has been open for 30 days with no activity. |
|
Hello! Is there anything that needs to be done to get this PR reviewed? |
|
сс @serhiy-storchaka Could you please take a look? |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
In general, LGTM. Thank you @dhdaines for your contribution.
Please look also at binascii.rst. It also contains documentation for Base85 related functions, mostly copied from base64.rst.
And since you updated documentation for some parameters, I think that docstrings for base64 and binascii functions also may need updates. Docstrings should not be as verbose as the main documentation, but they should be consistent with it.
Good, yes, I will make sure that they are in agreement.
Oh! Thanks for the reminder - I will update the relevant docstrings, since the whole reason for this PR is that some functions didn't behave as documented. |
Documentation build overview
14 files changed ·
|
|
Everything should be good now! I've updated the docstrings for both base64 and binascii, as well as the documentation for binascii. |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
LGTM. 👍 I have only one question.
|
Thanks @dhdaines for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
|
Sorry, @dhdaines and @serhiy-storchaka, I could not cleanly backport this to |
|
GH-149742 is a backport of this pull request to the 3.15 branch. |
|
GH-149743 is a backport of this pull request to the 3.14 branch. |
As noted in the issue there are a few clarifications needed in the "Base85 Encodings" section of the
base64module documentation. Namely:adobe=Truewas not fully specified, particularly that it raisesValueErroron unterminated inputpad=Truewas not correctly described - the input is always padded, the question is whether this padding is retained in the output encoding.Also note that
pad=Trueis required by the ZeroMQ standard, but perhaps ZeroMQ is tolerant of Z85 encoded data that isn't a multiple of 5 bytes.base64.a85(en,de)codedocumentation for Adobe mode #134837📚 Documentation preview 📚: https://cpython-previews--145843.org.readthedocs.build/