[PATCH 07 of 10] bytearray: replace array.array with bytearray

Yuya Nishihara yuya at tcha.org
Wed May 18 10:21:23 EDT 2016


On Thu, 12 May 2016 01:23:15 +0000, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1461083470 0
> #      Tue Apr 19 16:31:10 2016 +0000
> # Node ID 0032690e7a78694700632fe1fed541ab2f2ff3b0
> # Parent  d0b1768012385bb1ceacace2f6c32ee28a29f46e
> # Available At bb://timeless/mercurial-crew
> #              hg pull bb://timeless/mercurial-crew -r 0032690e7a78
> bytearray: replace array.array with bytearray
> 
> The array.array api changes significantly between py2 and py3.
> OTOH, bytearray was backported to py2.6+, and thus is supported
> everywhere Mercurial runs, and its interface is fairly consistent
> between py2 and py3.
> 
> Mercurial just wants an array that manages bytes,
> so this fits the bill nicely.

At first glance, this patch looks good to me. But as you know, bytearray()
requires extra str() calls. So I'll have to review this patch more carefully.

If nobody review this, I'll revisit it later.


More information about the Mercurial-devel mailing list