python-3.x?

Robert Collins robert.collins at canonical.com
Tue Jun 2 03:21:10 BST 2009


On Tue, 2009-06-02 at 10:55 +0900, Stephen J. Turnbull wrote:
> 
> No, that's actually pretty unlikely.  Yes, most of the content wants
> to be binary, but in the code of bzr most of it is dedicated to
> metadata for presentation to users ... which is text = str = Unicode.
> Of course there are the internal data structures, which have to be
> serialized to bytes for committing, but also to str for presentation.
> How you factor that is going to be an important decision.

Unicode in python 2.x is terribly slow: its four times the memory size
(for linux builds at least), and conversion is painfully slow. We've
accomodated that in our code by being very careful about whether we need
to convert, and trying to only ever convert once. Do you happen to know
if this is addressed in python 3? The clear separation of bytes and text
is useful for us, because it lets us stay in bytes all the way until we
actually want to render strings for users.

>  > Since the 2.x series of python isn't planned for obsoletion just
> yet, I
>  > don't think we have serious plans to switch over to 3.x for quite
> some
>  > time.
> 
> Have you tried Python 3?  It's nice ....
> 
> Not to recommend that Bazaar make the switch just yet, though.

I don't know if we have the willpower to support two languages for any
length of time; I suspect our changeover will be driven by the
availability of python 3.x (or backports thereof) in long term releases
of distributions.

-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090602/91c1eb6e/attachment.pgp 


More information about the bazaar mailing list