[Biopython-dev] PEP8 lower case module names?

Peter Cock p.j.a.cock at googlemail.com
Tue Sep 4 10:59:00 UTC 2012


On Tue, Sep 4, 2012 at 11:27 AM, Michiel de Hoon <mjldehoon at yahoo.com> wrote:
> Hi Peter,
>
> --- On Tue, 9/4/12, Peter Cock <p.j.a.cock at googlemail.com> wrote:
>> One idea I was pondering is a new parallel namespace,
>> ideally bio.* but we can't use that due to case
>> insensitive file systems like Windows and (by default)
>> Mac OS X. So perhaps biopy, or bp?
>
> As you say, the ideal namespace is bio.*, so let's use
> that. We have been using Bio.* for more than 10 years.
> We should not get stuck with a non-ideal namespace for
> the next 10+ years because there may be some glitches
> switching from Bio.* to bio.*. Frankly I doubt that this
> will cause huge problems in practice.

So you'd advocate a simple switch where from one
release to the next we change all the module names
(making them lower case, perhaps from consolidation
under bio.seq too)?

This may cause some difficulties for upgrades - it may
require manual intervention to remove the old Bio folder
in order to allow creation of the new bio folder.

>> We could gradually move code over to the new namespace,
>> using imports to preserve back compatibility - but support
>> both namespaces during a (long) transition period.
>
> Why do we need a transition period? It's just a matter
> of replacing upper case with lower case in the imports.

That forces people to update all their scripts at once.
Of course, we can document how to do this so a script
would work before and after the case change, e.g.

try:
    from bio.seq import Seq
except ImportError:

    from Bio.Seq import Seq

>> What I like about this is it allows people to make a
>> gradual
>> conversion - and we don't have to burden of two main
>> branches if we attempted a single jump to a Biopython v2.
>>
>> Does this seem worth considering?
>
> Yes but by all means, let's keep this simple. In the past, changes to Biopython have very rarely caused any serious problems for users.
>
> Best,
> -Michiel.
>



More information about the Biopython-dev mailing list