Hi,
http://docs.python.org/whatsnew/2.2.html says:
A new operator, //, is the floor division operator. [...] // is always available in Python 2.2; you don’t need to enable it using a __future__ statement.
Therefore, we should always use // for integer division. The DeprecationWarning was caused by a stray "/" used in "range()". Fixed.
I fixed the code to run with python 2.4 as well (tested without problems, let me know if anything shows up) and made all warnings errors. If you want to test with other python version, see config.mk. It is easy to set up virtualenv with other python version and install jinja2 there:
<install python2.4 and virtualenv> virtualenv -p python2.4 ./virtualpy2.4 ./virtualpy2.4/bin/easy_install jinja2
and modify PYTHON_BIN in config.mk as indicated there.
Best, Tomas
On Sat, Aug 13, 2011 at 3:17 PM, Cyril Hrubis metan@ucw.cz wrote:
Hi! As you may know the default type resulting from divison in python changed from int to float which results in type errors in GP_Convert_Scale.gen.h.t. The new integer division is no done by // which doesn't work in older python versions. I suppose we need to add explicit rounding to places when integer division is expected.
-- metan _______________________________________________ Gfxprim mailing list Gfxprim@ucw.cz http://www.ucw.cz/mailman/listinfo/gfxprim