[Biopython-dev] Ideas for Biopython 2.0

Peter Cock p.j.a.cock at googlemail.com
Fri Jun 23 09:49:32 UTC 2017


On Thu, Jun 22, 2017 at 12:49 PM, Wibowo Arindrarto
<w.arindrarto at gmail.com> wrote:
> Dear everyone,
>
> It seems that before we even start discussing the new package structure, we
> need to agree on which Python versions Biopython 2.0 should support.
>
> I agree with dropping Python 2.x dependency altogether and supporting the
> latest Python (which is 3.6 now; 3.5 still seems acceptable to support).

I agree.

> I like to think that it is easier nowadays to use your preferred Python
> version regardless of what is available on the host system. Many tools now
> provide various levels of isolation to achieve this. Virtualenv (and in a
> similar vein, Conda), for example, makes it easy to set up user-level Python
> independent from the system Python. Containers like Singularity which does
> not require root privileges are also available. And if all else fails, there
> is still Biopython 1.x as Tiago mentioned.

I agree - we already have to install our own Python on CentOS 6
because its system Python is 2.6.

> Aside from future maintainability reasons and simply being up to date, there
> are many Python 3.x-only features & standard library components that I feel
> can improve our code. To name a few from the top of my head:
>
> 1. Comparisons are more strict in Python 3 (now we get TypeErrors when
> comparing ints and non-ints, for example).
>
> 2. Laziness-by-default for some commonly used container operations like
> range(), dict.keys(), or dict.values().
>
> 3. New standard library modules like pathlib (for filesystem paths), enum
> (proper enumeration), and concurrent.futures (for launching parallel tasks)
> that are joys to work with.
>
> 4. New literal string interpolation (f-strings) which makes the code even
> easier to read.
>
> 5. Type hinting, which can be helpful as the codebase gets large.
>
> And of course there is also the bytes-versus-string issue, but I would argue
> that is actually also an improvement over Python 2.x.

For me, the f-strings and type hinting are strong arguments for using
Python 3.6 onwards for Biopython 2.0

> P.S. +1 for the GitHub page ~ it is a nice place to track this. Also, as
> Joao mentioned, it is probably useful to look what similar other libraries
> are available now while we do the upgrade.
>
> Cheers,
> Bow

That new page once again,

http://biopython.org/wiki/Biopython2

source,

https://github.com/biopython/biopython.github.io/blob/master/wiki/Biopython2.md

Peter


More information about the Biopython-dev mailing list