Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.3k
gh-145980: Add support for alternative alphabets in the binascii module#145981
gh-145980: Add support for alternative alphabets in the binascii module#145981serhiy-storchaka merged 12 commits intopython:mainfrom
Conversation
…i module* Add the alphabet parameter in functions b2a_base64(), a2b_base64(), b2a_base85() and a2b_base85().* And a number of "*_ALPHABET" constants.* Remove b2a_z85() and a2b_z85().
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| static PyObject * | ||
| get_reverse_table(binascii_state *state, PyObject *alphabet, int size, int padchar) | ||
| { | ||
| PyObject *reverse_table; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'd suggest having agoto error for cleanup in case this function grows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think this is preliminary.
serhiy-storchaka commentedMar 17, 2026
Damn, what is now? I spent more time fighting the CI than fixing genuine bugs. |
serhiy-storchaka commentedMar 20, 2026
Are there other suggestions or notes? I am going to merge this PR, because it is a dependence for#146192 and other changes. |
picnixz commentedMar 20, 2026
Not from side! |
4507d49 intopython:mainUh oh!
There was an error while loading.Please reload this page.
serhiy-storchaka commentedMar 20, 2026
Thank you for your review@picnixz. |
bedevere-bot commentedMar 20, 2026
|
bedevere-bot commentedMar 20, 2026
|
bedevere-bot commentedMar 20, 2026
|
…i module (pythonGH-145981)* Add the alphabet parameter in functions b2a_base64(), a2b_base64(), b2a_base85(), and a2b_base85().* And a number of "*_ALPHABET" constants.* Remove b2a_z85() and a2b_z85().
- Use the new `alphabet` parameter in `binascii`- Remove `binascii.a2b_base32hex()` and `binascii.b2a_base32hex()`- Change value for `.. versionadded::` ReST directive in docs for new `binascii` functions to "next" instead of "3.15"
vstinner commentedMar 20, 2026
This change introduced reference leaks in 3 tests:
I wrote#146230 to fix the leak. |
* upstream/main: (1475 commits) Docs: replace all `datetime` imports with `import datetime as dt` (python#145640)pythongh-146153: Use `frozendict` in pure python fallback for `curses.has_key` (python#146154)pythongh-138234: clarify returncode behavior for subprocesses created with `shell=True` (python#138536)pythongh-140947: fix contextvars handling for server tasks in asyncio (python#141158)pythonGH-100108: Add async generators best practices section (python#141885)pythonGH-145667: Merge `GET_ITER` and `GET_YIELD_FROM_ITER` (pythonGH-146120)pythongh-146228: Better fork support in cached FastPath (python#146231)pythongh-146227: Fix wrong type in _Py_atomic_load_uint16 in pyatomic_std.h (pythongh-146229)pythongh-145980: Fix copy/paste mistake in binascii.c (python#146230)pythongh-146092: Raise MemoryError on allocation failure in _zoneinfo (python#146165)pythongh-91279: Note `SOURCE_DATE_EPOCH` support in `ZipFile.writestr()` doc (python#139396)pythongh-146196: Fix Undefined Behavior in _PyUnicodeWriter_WriteASCIIString() (python#146201)pythongh-143930: Reject leading dashes in webbrowser URLspythongh-145916: Soft-deprecate ctypes.util.find_library (pythonGH-145919)pythongh-146205: Check the errno with != 0 in close impls in select module (python#146206)pythongh-146171: Fix nested AttributeError suggestions (python#146188)pythongh-146099: Optimize _GUARD_CODE_VERSION+IP via function version symbols (pythonGH-146101)pythongh-145980: Add support for alternative alphabets in the binascii module (pythonGH-145981)pythongh-145754: Update signature retrieval in unittest.mock to use forwardref annotation format (python#145756)pythongh-145177: Add emscripten run --test, uses test args from config.toml (python#146160) ...
Uh oh!
There was an error while loading.Please reload this page.
📚 Documentation preview 📚:https://cpython-previews--145981.org.readthedocs.build/