This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author isoschiz
Recipients christian.heimes, flox, isoschiz, jcea, pitrou, r.david.murray, serhiy.storchaka, sijinjoseph
Date 2013-04-07.16:42:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365352974.84.0.20459854787.issue17618@psf.upfronthosting.co.za>
In-reply-to
Content
Ok, I'm not even sure that Mercurial follows RFC1924! That RFC is specifically for encoding IPv6 addresses, and mandates that the calculations be performed on a 128bit integer.

The Mercurial implementation seems to follow the Ascii85 policy of taking each 4 bytes separately and doing 32bit arithmetic, but uses the lookup table from RFC1924, and is less lenient about spacing, and has no compression for sequences of zeroes.

It therefore looks like Mercurial (and I guess Git) have their own, non-standard base64 encoding. The Web at large mostly has "standard" Ascii85 encoding/decoding described. RFC1924 itself has a Python implementation on Github:

https://github.com/drkjam/netaddr/blob/rel-0.7.x/netaddr/ip/rfc1924.py

So I'm not sure what you want to do. I would suggest a standard Ascii85 encoder is definitely useful, and provides feature parity with Ruby. If we want the standard library to be able to read/write Mercurial/Git base64 encoded files, then I guess that can be added too. If we think RFC1924 is useful/used, then the implementation in the netaddr lib looks right.
History
Date User Action Args
2013-04-07 16:42:54isoschizsetrecipients: + isoschiz, jcea, pitrou, christian.heimes, r.david.murray, flox, sijinjoseph, serhiy.storchaka
2013-04-07 16:42:54isoschizsetmessageid: <1365352974.84.0.20459854787.issue17618@psf.upfronthosting.co.za>
2013-04-07 16:42:54isoschizlinkissue17618 messages
2013-04-07 16:42:54isoschizcreate