Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor polishing changes
- Reword NEWS.d entry to "Base32" instead of "base-32".
  No prior entries have ever mentioned "base-64", etc.,
  but they have mentioned "Base64", etc., so this is
  more consistent.

- Reword whatsnew entry to "Base32" instead of "Base 32".
  No prior entries have ever mentioned "Base 64", etc.,
  and there is an entry a little further up mentioning
  "Ascii85, Base85, and Z85", so this is more consistent.

- Add a whatsnew entry in Optimizations > base64 & binascii
  section.

- Whitespace change in `binascii.c`.
  • Loading branch information
kangtastic committed Mar 22, 2026
commit e3ee6df8be3f197fd3cb1fc11dd68b37317bdd58
6 changes: 5 additions & 1 deletion Doc/whatsnew/3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ binascii
* Added the *ignorechars* parameter in :func:`~binascii.a2b_base64`.
(Contributed by Serhiy Storchaka in :gh:`144001`.)

* Added functions for Base 32 encoding:
* Added functions for Base32 encoding:

- :func:`~binascii.b2a_base32` and :func:`~binascii.a2b_base32`

Expand Down Expand Up @@ -1285,6 +1285,10 @@ base64 & binascii
two orders of magnitude less memory.
(Contributed by James Seo and Serhiy Storchaka in :gh:`101178`.)

* Implementation for Base32 has been rewritten in C.
Encoding and decoding is now two orders of magnitude faster.
(Contributed by James Seo in :gh:`146192`)


csv
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Add base32 support to :mod:`binascii` and improve the performance of the
base-32 converters in :mod:`base64`. Patch by James Seo.
Add Base32 support to :mod:`binascii` and improve the performance of the
Base32 converters in :mod:`base64`. Patch by James Seo.
4 changes: 2 additions & 2 deletions Modules/binascii.c
Original file line number Diff line number Diff line change
Expand Up @@ -1598,8 +1598,8 @@ binascii_a2b_base32_impl(PyObject *module, Py_buffer *data,
state = get_binascii_state(module);
if (state) {
PyErr_SetString(state->Error, (octa_pos + pads == 8)
? "Excess data after padding"
: "Discontinuous padding not allowed");
? "Excess data after padding"
: "Discontinuous padding not allowed");
}
goto error;
}
Expand Down