[Biopython-dev] PEP8 lower case module names?

Peter Cock p.j.a.cock at googlemail.com
Fri Sep 28 10:50:52 UTC 2012


On Thu, Sep 20, 2012 at 10:08 AM, Peter Cock <p.j.a.cock at googlemail.com> wrote:
> On Sun, Sep 16, 2012 at 1:34 PM, Peter Cock <p.j.a.cock at googlemail.com> wrote:
>>>
>>> I guess we need to have a little hack with the 2to3 library and
>>> try defining our own custom fixer for the imports...
>>
>> I've made a start at this - the easy part seems to work :)
>>
>> https://github.com/peterjc/biopython/commits/py3lower
>>
>> ...

The code to do this lower case name mangling remains
a quite spaghetti like mess in do2to3.py but it now works
enough to pass the test suite (with some but not all 3rd
party dependencies installed) under Linux and my Mac
OS X machine (where like Windows I have a case
insensitive file system).

Here's a clean run on TravisCI (Linux with a case sensitive
file system):
https://travis-ci.org/#!/peterjc/biopython/jobs/2584146

I've not tried Windows itself yet. Also only Python 3.2

Note if you want to try this, after switching to (and after
switching from) the py3lower branch you should delete
the build/py3.* folder where the 2to3 converted code
is cached.

The good news is that only a handful of bits of code
needed special case code (e.g. finding the Entrez DTD
files), with most tweaks just to import lines (as mentioned
earlier) or renaming of internal variables.

So this idea to adopt PEP8 lower case module names
as part of supporting Python 3 appears to be technically
viable.

Peter



More information about the Biopython-dev mailing list