Skip to content

Commit e3ee6df

Browse files
committed
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`.
1 parent 58707ea commit e3ee6df

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

Doc/whatsnew/3.15.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ binascii
662662
* Added the *ignorechars* parameter in :func:`~binascii.a2b_base64`.
663663
(Contributed by Serhiy Storchaka in :gh:`144001`.)
664664

665-
* Added functions for Base 32 encoding:
665+
* Added functions for Base32 encoding:
666666

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

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

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

12891293
csv
12901294
---
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Add base32 support to :mod:`binascii` and improve the performance of the
2-
base-32 converters in :mod:`base64`. Patch by James Seo.
1+
Add Base32 support to :mod:`binascii` and improve the performance of the
2+
Base32 converters in :mod:`base64`. Patch by James Seo.

Modules/binascii.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,8 +1598,8 @@ binascii_a2b_base32_impl(PyObject *module, Py_buffer *data,
15981598
state = get_binascii_state(module);
15991599
if (state) {
16001600
PyErr_SetString(state->Error, (octa_pos + pads == 8)
1601-
? "Excess data after padding"
1602-
: "Discontinuous padding not allowed");
1601+
? "Excess data after padding"
1602+
: "Discontinuous padding not allowed");
16031603
}
16041604
goto error;
16051605
}

0 commit comments

Comments
 (0)