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().
| static PyObject * | ||
| get_reverse_table(binascii_state *state, PyObject *alphabet, int size, int padchar) | ||
| { | ||
| PyObject *reverse_table; |
There was a problem hiding this comment.
I'd suggest having a goto error for cleanup in case this function grows.
There was a problem hiding this comment.
I think this is preliminary.
|
Damn, what is now? I spent more time fighting the CI than fixing genuine bugs. |
|
Are there other suggestions or notes? I am going to merge this PR, because it is a dependence for #146192 and other changes. |
|
Not from side! |
|
Thank you for your review @picnixz. |
|
|
|
…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"
|
This change introduced reference leaks in 3 tests:
I wrote #146230 to fix the leak. |
📚 Documentation preview 📚: https://cpython-previews--145981.org.readthedocs.build/