[reportlab-users] patch to make Reportlab work again on Jython

Robin Becker robin at reportlab.com
Fri Jan 30 08:20:27 EST 2009


Raphaël Valyi wrote:

> Dear Reportlab developers,

........

>

> Proposed patch:

>

> So, advised by Charles Headius Nutter (the JRuby rock star who work

> around the kind of issue), I came up with a patch for the reportlab

> file (/reportlab/pdfbase/_fontdata.py), wrapping each of those very

> large list declarations inside dumb private method so that no method

> will get larger than the allowed size. I admit it, that's not

> particularily elegant. But it's not too ugly either and easy to

> refactor the right way when the Jython bug get fixed (after OpenERP on

> Java makes Sun release how much important this is). But more

> importantly, it's working and allow using Reportlab in Jython again

> (at least on Jython trunk, expect release in February)!

>

> So please could you consider including the attached patch (the whole

> file actually) in your trunk distro (it's made from the trunk SVN).

> I'm very sure it has not perf impact at all either. On the contrary,

> running on Jython could soon give you a serious boost when everything

> will JIT just as nicely as in JRuby.

>

> What is your position regarding to this?

>

>

> Raphaël Valyi

> www.smile.fr

.......
well we have an old working implementation that ran under jython which you can
check out at

http://svn.reportlab.com/svn/public/reportlab/branches/Jython-branch/reportlab

In that code (which is now 5 years old) we did not find it necessary to touch
any large arrays at all in _fontdata. So has jython regressed or is it java
that's changed?
--
Robin Becker


More information about the reportlab-users mailing list