From 76d3d91e4076f403ab79de2d852480393dd1726a Mon Sep 17 00:00:00 2001 From: Advit Arora Date: Mon, 24 Aug 2026 02:03:01 +0530 Subject: [PATCH 1/2] gh-155193: Remove urlsafe_b64decode from the *canonical* entry in What's New 3.15 --- Doc/whatsnew/3.15.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 9a1efd811eb2bc..bf9aceaa20b2b4 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -1009,7 +1009,7 @@ base64 * Added the *canonical* parameter in :func:`~base64.b32decode`, :func:`~base64.b32hexdecode`, - :func:`~base64.b64decode`, :func:`~base64.urlsafe_b64decode`, + :func:`~base64.b64decode`, :func:`~base64.a85decode`, :func:`~base64.b85decode`, and :func:`~base64.z85decode`, to reject encodings with non-zero padding bits or other non-canonical From c5bf8b95d53b7a5879e3e61fcfc3cd6df606aec9 Mon Sep 17 00:00:00 2001 From: Advit Arora Date: Mon, 24 Aug 2026 03:23:15 +0530 Subject: [PATCH 2/2] gh-155193: Drop base16 from the gh-146311 NEWS entry --- Misc/NEWS.d/3.15.0b1.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Misc/NEWS.d/3.15.0b1.rst b/Misc/NEWS.d/3.15.0b1.rst index e0fcab0eef870f..b53733f7b5df3b 100644 --- a/Misc/NEWS.d/3.15.0b1.rst +++ b/Misc/NEWS.d/3.15.0b1.rst @@ -1081,10 +1081,10 @@ Deprecate :meth:`http.cookies.Morsel.js_output` and .. nonce: iHWO0v .. section: Library -Add a *canonical* keyword-only parameter to the base16, base32, base64, -base85, ascii85, and Z85 decoders in :mod:`base64` and :mod:`binascii`. When -true, encodings with non-zero padding bits (base16/32/64) or non-canonical -encodings (base85/ascii85) are rejected. Single-character final groups in +Add a *canonical* keyword-only parameter to the base32, base64, base85, +ascii85, and Z85 decoders in :mod:`base64` and :mod:`binascii`. When true, +encodings with non-zero padding bits (base32/64) or non-canonical encodings +(base85/ascii85) are rejected. Single-character final groups in :func:`binascii.a2b_ascii85` and :func:`binascii.a2b_base85` are now always rejected as encoding violations, regardless of *canonical*; previously they were silently ignored and produced no output bytes.