python-3.x?

John Arbash Meinel john at arbash-meinel.com
Mon Jun 1 16:42:01 BST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bob Tanner wrote:
> Seeing python-3.1rc1 released yesterday.
> 
> What's the status of bzr on python-3.x ?
> 

My guess... utterly broken. :)

At a bare minimum you have to use the 2to3 converter to create an
entirely new source tree, because python-3 python code is not compatible
with python-2 source code. (At a minimum, consider that

 print 'foo'

became

 print('foo')
)

Anyway, I don't think anyone has specifically tried it, and I imagine
whoever does is going to be suffering for a bit. Probably the biggest
thing I'm aware of is the "bytes" versus "string" split. Where the
"unicode" type actually became the "str" type, and the "str" type became
"bytes".

Which means that internally we need to pay a lot more attention when
reading and writing, as to whether we want to be dealing with raw bytes,
or with Unicode strings. My guess is that most things want to go to
'bytes' (aka stay as 8-bit strings), but someone would really need to
dig into it.

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. We still explicitly maintain py 2.4 compatibility. Last I checked
our PQM was using python-2.4 to run the test suite, so we were fairly
guaranteed to not accidentally introduce a 2.4-ism. (Like 'with'
statements, defaultdict, etc.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoj9skACgkQJdeBCYSNAAPyewCgyDjpUbyd2UOmZFzmTzS+u6Lu
a30AoKV8BlNMZXdVXV3sh0M/svXlscQl
=Mpas
-----END PGP SIGNATURE-----



More information about the bazaar mailing list