msg180206 - (view) |
Author: Matthäus Wander (matthaeus.wander) |
Date: 2013-01-18 18:21 |
RFC4648 specifies two different alphabets for Base32: 1) the common one already used in RFC3548 and implemented in Python, and 2) an "Extended Hex" alphabet which is used by e.g. DNSSEC NSEC3 but not yet implemented in Python.
The attached patches add the "Extended Hex" alphabet to Python 2.7 and 3 via an optional parameter 'base32hex=False'. Default behavior is not changed.
patch Lib/base64.py < py27_base64.patch
patch Lib/test/test_base64.py < py27_test_base64.patch
|
msg180207 - (view) |
Author: Ezio Melotti (ezio.melotti) * |
Date: 2013-01-18 18:26 |
Since this is a new feature it can go on 3.4 only.
It would also be better to include both the changes for base64.py and test_base64.py in a single patch and attach that, rather than uploading an archive that contains both.
FTR the links to the relevant RFCs are:
http://tools.ietf.org/html/rfc3548
http://tools.ietf.org/html/rfc4648
|
msg180210 - (view) |
Author: Matthäus Wander (matthaeus.wander) |
Date: 2013-01-18 18:51 |
Added single patch as requested.
|
msg243591 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) * |
Date: 2015-05-19 13:57 |
The patch can't be longer applied cleanly. It should be synchronized with sources. It is the last chance for this feature to get to 3.5 if somebody will update the patch and add the documentation.
The feature itself LGTM. The only my doubt is about the name of boolean parameter. "base32hex" is recommended as encoding name. Parameter can be named as "exthex" or "extended_hex". Or may be add separate functions b32hexencode/b32hexdecode. I'm not sure.
|
msg247134 - (view) |
Author: Matthäus Wander (matthaeus.wander) |
Date: 2015-07-22 16:50 |
I've created a new patch that works against the current 3.5 sources. Should be fine for 3.6, I guess.
Separate functions b32hexencode and b32hexdecode are used now. There is no optional parameter "base32hex" anymore.
|
msg247158 - (view) |
Author: Martin Panter (martin.panter) * |
Date: 2015-07-23 01:21 |
Matthäus, I think you uploaded the old patch again by accident. Also, see Berker’s old comments about documentation, and my new suggestions, on the Rietveld code review, if you haven’t already.
|
msg247205 - (view) |
Author: Matthäus Wander (matthaeus.wander) |
Date: 2015-07-23 14:15 |
*facepalm* Yes, I uploaded the old patch twice. Sorry for that.
- Added doc update.
- Added test case that includes all 32 characters codes.
I'm reusing the existing Base32 table generation logic without changes. It has been changed (in 3.4 or so) since the first patch. If the logic is still to be changed as suggested by Martin in Rietveld review, I'd suggest to open a separate issue because it affects the existing Base32 implementation, too.
|
msg247216 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) * |
Date: 2015-07-23 15:26 |
Added comments on Rietveld.
|
msg338962 - (view) |
Author: Cheryl Sabella (cheryl.sabella) * |
Date: 2019-03-27 14:22 |
Is there interest in having this patch converted to a pull request?
|
msg375123 - (view) |
Author: miss-islington (miss-islington) |
Date: 2020-08-10 14:48 |
New changeset 4ce6faa6c9591de6079347eccc9e61ae4e8d9e31 by Filipe Laíns in branch 'master':
bpo-16995: add support for base32 extended hex (base32hex) (GH-20441)
https://github.com/python/cpython/commit/4ce6faa6c9591de6079347eccc9e61ae4e8d9e31
|
msg375137 - (view) |
Author: Filipe Laíns (FFY00) * |
Date: 2020-08-10 18:58 |
Paul, the PR is now merged :). Can you close the bug?
|
msg375138 - (view) |
Author: Paul Ganssle (p-ganssle) * |
Date: 2020-08-10 19:00 |
Thanks Filipe!
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:40 | admin | set | github: 61199 |
2020-08-10 19:00:47 | p-ganssle | set | status: open -> closed versions:
+ Python 3.10, - Python 3.8 messages:
+ msg375138
resolution: fixed stage: patch review -> resolved |
2020-08-10 18:58:59 | FFY00 | set | nosy:
+ p-ganssle messages:
+ msg375137
|
2020-08-10 14:48:28 | miss-islington | set | nosy:
+ miss-islington messages:
+ msg375123
|
2020-05-27 00:08:10 | FFY00 | set | nosy:
+ FFY00 pull_requests:
+ pull_request19697
|
2019-03-27 14:22:28 | cheryl.sabella | set | nosy:
+ cheryl.sabella
messages:
+ msg338962 versions:
+ Python 3.8, - Python 3.6 |
2015-07-23 15:26:24 | serhiy.storchaka | set | stage: needs patch -> patch review |
2015-07-23 15:26:16 | serhiy.storchaka | set | messages:
+ msg247216 |
2015-07-23 14:50:03 | serhiy.storchaka | set | files:
+ py36_base32hex.patch |
2015-07-23 14:15:35 | matthaeus.wander | set | files:
+ py36_base32hex.patch
messages:
+ msg247205 |
2015-07-23 08:41:18 | serhiy.storchaka | set | stage: patch review -> needs patch |
2015-07-23 01:21:05 | martin.panter | set | nosy:
+ martin.panter messages:
+ msg247158
|
2015-07-22 16:50:52 | matthaeus.wander | set | files:
+ py3_base32hex.patch
messages:
+ msg247134 versions:
+ Python 3.6, - Python 3.5 |
2015-05-19 13:57:38 | serhiy.storchaka | set | nosy:
+ pitrou messages:
+ msg243591
|
2015-05-19 13:38:13 | serhiy.storchaka | set | stage: patch review versions:
+ Python 3.5, - Python 3.4 |
2013-05-18 18:57:14 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka
|
2013-01-18 18:51:10 | matthaeus.wander | set | files:
+ py3_base32hex.patch keywords:
+ patch messages:
+ msg180210
|
2013-01-18 18:26:11 | ezio.melotti | set | nosy:
+ ezio.melotti
messages:
+ msg180207 versions:
+ Python 3.4, - Python 2.7, Python 3.5 |
2013-01-18 18:21:19 | matthaeus.wander | create | |