[Biopython-dev] PEP8 lower case module names?
Peter Cock
p.j.a.cock at googlemail.com
Sun Sep 16 08:34:31 EDT 2012
On Fri, Sep 7, 2012 at 2:01 AM, Peter Cock <p.j.a.cock at googlemail.com> wrote:
> 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.
>
I've made a start at this - the easy part seems to work :)
https://github.com/peterjc/biopython/commits/py3lower
The hard bit will be fixing all the import lines... ;)
Peter
More information about the Biopython-dev
mailing list