[reportlab-users] Status of Python 3 port?

Andy Robinson andy at reportlab.com
Fri Feb 5 12:11:15 EST 2010


We've just been discussing this internally. Fortunately someone was
just finishing up another project.

Over the next couple of weeks we will have a go at porting to 3 and
see what the issues are i.e.

- remove as many of the minor old usages which the '-3'
- get set up to run 2to3 regularly
- start dealing with the Unicode and bytes distinction internally.

As Robin said earlier, it's not as easy as you might think. He has
tried two ports. 2to3 produces code, and it runs, but then it dies
because there are many places where we relied on str(...) happening to
generate the right things in the PDF output. I think one of the
first steps is to go through and put in assertions and doctests saying
'this variable is expected to be a Unicode string' and 'this variable
is expected to be a byte string', and locking down the behaviour of
pdfdoc.

I am not sure yet if we will end up with a full branch (which would be
a real pain), or if we can make it work across Pythons 2.4,2.5,2.6 and
3.0 (via 2to3) and some sets of patches. We should know in a
couple of weeks.

- Andy


More information about the reportlab-users mailing list