]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-73613: Support Base32 and Base64 without padding (GH-147974)
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 4 Apr 2026 18:26:16 +0000 (21:26 +0300)
committerGitHub <noreply@github.com>
Sat, 4 Apr 2026 18:26:16 +0000 (21:26 +0300)
commit8bf8bf92921a13cc18f7d1b5bed8bd32c8485ba4
treeb54c96bb2b5b107a5c87b9742539f70821639442
parent75be902a13c670a1ea16aee3644548723b7d7407
gh-73613: Support Base32 and Base64 without padding (GH-147974)

Add the padded parameter in functions related to Base32 and Base64 codecs
in the binascii and base64 modules.  In the encoding functions it controls
whether the pad character can be added in the output, in the decoding
functions it controls whether padding is required in input.

Padding of input no longer required in base64.urlsafe_b64decode() by default.
13 files changed:
Doc/library/base64.rst
Doc/library/binascii.rst
Doc/whatsnew/3.15.rst
Include/internal/pycore_global_objects_fini_generated.h
Include/internal/pycore_global_strings.h
Include/internal/pycore_runtime_init_generated.h
Include/internal/pycore_unicodeobject_generated.h
Lib/base64.py
Lib/test/test_base64.py
Lib/test/test_binascii.py
Misc/NEWS.d/next/Library/2026-04-01-18-17-55.gh-issue-73613.PLEebm.rst [new file with mode: 0644]
Modules/binascii.c
Modules/clinic/binascii.c.h