diff --git a/CHANGELOG b/CHANGELOG index 6e6a46f..cfbfe5e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,7 +2,7 @@ V 1.5.0 UNRELEASED Add per serie configuration Add half pie (thanks philt2001) Add render_table (WIP) - Make lxml an optionnal dependency + Make lxml an optionnal dependency (huge speed boost in pypy) V 1.4.6 Add support for \n separated multiline titles (thanks sirlark) diff --git a/pygal/ghost.py b/pygal/ghost.py index 4350748..c4aca5a 100644 --- a/pygal/ghost.py +++ b/pygal/ghost.py @@ -30,7 +30,6 @@ from pygal._compat import u, is_list_like from pygal.graph import CHARTS_NAMES from pygal.config import Config, CONFIG_ITEMS from pygal.util import prepare_values -from pygal.table import Table from uuid import uuid4 @@ -115,6 +114,8 @@ class Ghost(object): return self.make_instance().render_tree() def render_table(self, **kwargs): + # Import here to avoid lxml import + from pygal.table import Table real_cls, self.cls = self.cls, Table rv = self.make_instance().render(**kwargs) self.cls = real_cls diff --git a/tox.ini b/tox.ini index afaa5e9..665bc2f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py26,py27,py32,py33,py34 +envlist = py26,py27,py32,py33,py34,pypy [testenv] sitepackages=True