[Biopython-dev] Test failures on Jython 2.5.1

Eric Talevich eric.talevich at gmail.com
Tue May 18 07:29:53 UTC 2010


On Mon, May 17, 2010 at 12:37 AM, Peter <biopython at maubp.freeserve.co.uk>wrote:

> Hi all (especially Eric),
>
> I've just run the test suite with Jython 2.5.1 and this found some new
> problems. Most of these are XML related from Bio.Phylo
>
> ERROR: Round-trip parsing and serialization of apaf.xml.
> ExpatError: The element type "phy:clade" must be terminated by the
> matching end-tag "</phy:clade>".
>
> ERROR: Round-trip parsing and serialization of bcl_2.xml.
> ExpatError: The element type "phy:branch_length" must be terminated by
> the matching end-tag "</phy:branch_length>".
>
> ERROR: Round-trip parsing and serialization of o_tol_332_d_dollo.xml.
> ExpatError: XML document structures must start and end within the same
> entity.
>
> ERROR: Round-trip parsing and serialization of made_up.xml.
> ExpatError: Premature end of file.
>
> ERROR: Round-trip parsing and serialization of phyloxml_examples.xml.
> ExpatError: XML document structures must start and end within the same
> entity.
>
> It would probably be instructive to look at the serialisation output in
> an XML validator - if there is a problem it may be the Jython parser
> is stricter than the C Python XML parser.
>
>
(If you're gonna poke around in the bushes, be ready to stir up a few
snakes...)

Doing a round-trip parsing, rewriting and re-parsing of the test files
manually works in Jython, and the XML output looks the same as it does from
CPython. I don't immediately see why the test is failing, although I faintly
recall reading that Jython's xml.etree implementation is/was a little short
of fully baked -- maybe its parser is stopping early for some reason.

I'm sorely tempted to just update to the documentation to say Jython support
is beta, since I hadn't tried it myself until you pointed this out. But now
that we know about this bug, I suppose it warrants another day or so of
fussing around with Jython internals. I'll report back after I've done that.

-Eric



More information about the Biopython-dev mailing list