On Fri, Jul 17, 2009 at 14:58, Dave Kuhlman<dkuhlman@...> wrote:
> Possibly the following is being overly picky, but might
> help with the ElementTree problem:
> odf_odt requires some form of ElementTree. If it is not in the
> standard library, then odf_odt will try to use a separately
> installed ElementTree. So, one possible solution to the
> ElementTree problem for Python 2.3 would be to require
> installation of ElementTree if it is not in the Python
> standard library.
> *But*, I do not believe that dropping support for Python 2.3 helps with
> the ElementTree issue in odf_odt. I checked the "What's new" pages,
> and it looks like ElementTree was not added to the standard library
> until Python 2.5. There is no mention of it being added in Python 2.4.
You're right on the version.
I don't want to require installation of ElementTree or anything else.
Instead, please make the odf_odt writer fail gracefully if ElementTree
is not present. ("Gracefully" means producing some useful output, not
raising an exception & crashing.) In addition, please make the test
suite skip the odf_odt writer's tests as appropriate. Having
test/test_writers/test_odt.py import docutils.writers.odf_odt
(indirectly importing ElementTree) ought to do it.
(It seems to me that there was a mechanism to cleanly skip certain
tests or modules, but I can't find it now.)
The print statements in docutils/writers/odf_odt/__init__.py are
somewhat obnoxious and unhelpful (they don't mention *why*
ElementTree/lxml are needed. I don't want to see that in the test
suite output. There are other print statements in the module that
should be removed/altered too.
There's a lot of commented-out junk code in the module, and too-long
lines (over 80 chars). Please clean those up.
David Goodger <http://python.net/~goodger>