[Biopython-dev] test_PhyloXML.py on Python 3
Peter
biopython at maubp.freeserve.co.uk
Fri Jan 14 19:02:50 UTC 2011
On Fri, Aug 13, 2010 at 2:24 AM, Eric Talevich <eric.talevich at gmail.com> wrote:
> On Thu, Aug 12, 2010 at 12:37 PM, Peter <biopython at maubp.freeserve.co.uk>wrote:
>
>> Hi Eric (et al),
>>
>> Is test_PhyloXML.py working for you under Python 3?
>>
>> I'm getting the following (both with and without the 2to3 --nofix=long
>> option):
>>
>> $ python3 test_PhyloXML.py
>> ...
>> File "/home/xxx/lib/python3.1/site-packages/Bio/Phylo/PhyloXMLIO.py",
>> line 298, in __init__
>> event, root = next(context)
>> File "<string>", line 59, in __iter__
>> TypeError: invalid event tuple
>>
>> ----------------------------------------------------------------------
>> Ran 47 tests in 0.015s
>>
>> All the sub-tests in test_PhyloXML.py are failing the same way.
>>
>> >From memory this was working recently.
>>
>>
> Yeah, it was... it's fixed now/again.
>
> This is the issue with passing byte/unicode strings to cElementTree in
> Python 3. I had a check for Python versions 3.0.0 through 3.1.1, where we
> need to import ElementTree instead of cElementTree. Apparently Python 3.1.2
> still has the bug.
>
> -Eric
It looks like Python 3.1.3 also has the same bug in cElementTree :(
See this buildbot-slave log for example,
http://events.open-bio.org:8010/builders/Linux%2064%20-%20Python%203.1/builds/96/steps/shell_3/logs/stdio
I've extended the workaround again:
https://github.com/biopython/biopython/commit/105444a340a2ad0e48c8582864104333b90adfc0
Let's see if we get any progress on the Python bug itself,
http://bugs.python.org/issue9257
Peter
More information about the Biopython-dev
mailing list