[Biopython-dev] Python 3 porting

Peter biopython at maubp.freeserve.co.uk
Thu Jul 8 07:34:10 UTC 2010


2010/7/7 Eric Talevich <eric.talevich at gmail.com>:
> 2010/7/5 Tiago Antão <tiagoantao at gmail.com>
>
>>  PhyloXML I am really stuck and NCBXML seems to have a problem only
>> inside run_tests.
>
> Hello,
>
> I ran "python -3 test_PhyloXML.py" and found one warning specific to
> PhyloXML, about comparing unequal types in BaseTree.py. I have a fix for
> this, shall I push it to GitHub?
>
> Was there anything else in Bio/Phylo/ that was causing problems? I'm just
> running the unit tests with the -3 flag, and didn't find any other issues
> that way.

Running the test in Python 2.6 or 2,7 with -3 will spot a number of issues,
and if we can fix them we should. Assuming your comparison fix is simple
please go ahead and commit it. This will not spot everything (e.g. unicode
and string problems).

Actually running 2to3 and then trying the tests on Python 3 will spot more
or different problems (such as unicode/bytes problems). I think this is where
Tiago was having trouble with phyloXML.

Note that the 2to3 script will be slightly different depending which copy
you are using (i.e. which version of Python it came with).

Peter




More information about the Biopython-dev mailing list