[reportlab-users] Python 3000

Robin Becker robin at reportlab.com
Fri Dec 5 05:27:38 EST 2008


Albertas Agejevas wrote:

> On Thu, Dec 04, 2008 at 06:01:36PM +0000, Andy Robinson wrote:

>> Guido wants people to release "compatible" packages. The same code

>> base cannot serve Python 2.3-2.6 and Python 3.0 and we also don't have

>> the time for two major, diverging branches. So the real question

>> is whether we do a "modest" ReportLab 3.0 with the minimum necessary

>> changes; or (my preference) concentrate on creating the best library

>> we can on Python 3000 without the constraints of compatibility with

>> everything written before. It is a rare chance for a break with the

>> past.

>

> Yay, this indeed sounds like a great opportunity to get rid of the

> cruft accumulated during the years. On the other hand, having one,

> compatible, trunk is of a great value as well. Perhaps the pre-2.6

> versions can be automatically generated out of the 2.6 mainline with a

> script similar to 2to3 stripping the b prefixes from byte strings.

>

> Albertas

........
The main problem I found during my early efforts was that we have fairly
optimised code for writing out the actual PDF. Unfortunately that code makes
lots of assumptions about the various strings that come from the canvas which
are broken by having those strings in unicode form. Effectively we need to
convert everything to bytes for output and there are a lot of places where it's
not obvious what encoding is intended. I think we need a rewrite of the stuff in
pdfbase.
--
Robin Becker


More information about the reportlab-users mailing list