[Biopython-dev] long for longitude in Bio.Phylo and Python 3

Eric Talevich eric.talevich at gmail.com
Mon Jul 26 17:04:24 UTC 2010


On Mon, Jul 26, 2010 at 12:47 PM, Peter <biopython at maubp.freeserve.co.uk>wrote:

> Hi Eric et all,
>
> Background: Eric has found a problem in Bio.Phylo with variables, arguments
> and properties called "long" for longitude which the 2to3 script is wrongly
> converting into "int", see: http://bugs.python.org/issue2734
>
> If the remaining issue with Bug 2734 is fixed, we would still have a
> problem
> running the conversion with 2to3 as included with all releases of Python to
> date (i.e. 2.6, 2.7, 3.1), which would complicate deployment.
>
> Eric: It could break backwards compatibility, but would a switch from lat &
> long to latitude and longitude be the least painful solution? Do you think
> we could support both names as part of a deprecation cycle?
>
> Peter
>

The names "lat", "long" and "alt" are from the phyloXML spec, so it's
convenient to keep them the same in Biopython. But I could change them to
the longer form if that's needed. The parser and serializer assume the
attribute names match the XML spec in general, and special-case names that
won't work in Python (like "from").

Deprecation: Since we note in the Tutorial that Bio.Phylo is semi-beta, I'd
like to use an accelerated deprecation cycle for name changes like this: 1
transitional release with shims that trigger a warning, then remove the
shims in the release after that. Is that OK?

I haven't had a chance to try "2to3 --nofix=long" on the entire codebase
yet.

Best,
Eric



More information about the Biopython-dev mailing list