[Biopython-dev] PEP8 lower case module names?

Peter Cock p.j.a.cock at googlemail.com
Fri Sep 7 01:01:04 UTC 2012


On Thu, Sep 6, 2012 at 3:40 PM, Eric Talevich <eric.talevich at gmail.com> wrote:
> On Thu, Sep 6, 2012 at 6:13 AM, Michiel de Hoon <mjldehoon at yahoo.com> wrote:
>> --- On Thu, 9/6/12, Peter Cock <p.j.a.cock at googlemail.com> wrote:
>> > Here's a further (and slightly more radical) idea: We
>> > stick with using 'Bio' and the current mixed case
>> > names on Python 2, but adopt 'bio' and other PEP8
>> > compatible names for Python 3 (as a uniform
>> > strict automatic rule: mixed case -> lower case)?
>> > i.e. Do this as part of our 2to3 process.
>>
>> The Python developers argue against combining a switch to Python 3 with
>> other major changes, since then if bugs arise it is unclear if it is due to
>> the switch to Python 3 or due to the other changes. But perhaps it's OK if
>> we have one Bio.* version for Python 2 and one bio.* version for Python 3
>> that are otherwise completely identical to each other.
>
>
> Agreed, since the bio.* version is generated by the 2to3 script it should
> still be easy enough to distinguish "this is a bug in the library" from
> "this is a problem with Py3, 2to3 or your environment". The extra separation
> on the filesystem provided by Py2/Py3 should also prevent some problems with
> case-insensitivity and the environment.

Yes - they would be in different site-packages folders, and since
we have a tiny Python 3 install base, moving them from Bio to
bio seems low impact.

I guess we need to have a little hack with the 2to3 library and
try defining our own custom fixer for the imports...

Note this case difference will slightly complicate our documentation -
but that is always going to be an issue for the Python 2 to 3 move.

>>
>> > How about over the next year we gradually consolidate
>> > modules under the existing mixed case names? e.g.
>> > move Bio.AlignIO functionality and Bio.Align,
>>
>> I guess you meant "merge Bio.AlignIO functionality into Bio.Align".

Yes, sorry.

>> > and Bio.Seq* under Bio.Seq (leaving backwards compatible
>> > imports supported but deprecated).
>>
>> Sounds good to me. AFAIAC, we don't need to do this gradually
>> over the next year. May as well do it for the next release.
>
> Doing this in a single release might be better, so we can document/remember
> the release number when the Grand Reshuffling took place and troubleshoot
> users' resulting problems more easily.

Doing it one release makes sense - but we can do it gradually in
a series of self contained commits - and feel our way.

Michiel - do you want to start with the Bio/Seq.py to Bio/Seq/__init__.py
change? We'll need to do that before any consolidation steps.

> Should we call that Biopython 2.0.0 and switch to semantic version numbers?
>

Maybe... at some point a Biopython 2 would be a good excuse for
some publicity and another application note.

The eventual move from developing under Python 2 (and using 2to3
for Python 3) to natively developing under Python 3 would be an
excuse for a major version bump.

Peter



More information about the Biopython-dev mailing list