[Biopython-dev] Post Biopython 1.62 release, clean-up after dropping Python 2.5
p.j.a.cock at googlemail.com
Thu Aug 29 09:04:59 UTC 2013
On Wed, Aug 28, 2013 at 7:53 PM, Peter Cock <p.j.a.cock at googlemail.com> wrote:
> Hello all - especially newcomers,
> There are going to be several boring but useful things to do to
> the Biopython code base once we're finished with Python 2.5
> (the imminent release of Biopython 1.62 has been clearly
> described as the final Biopython release to support it).
> Some of these tasks are quite easy, and might tempt some
> of our non-core contributors or new-comers to have a go,
> however to avoid too much duplication of effort I'd suggest
> **replying in this thread if you want to tackle anything** - and
> then start working out how to send us your first pull request.
> Things which will need doing:
> (0) Disable the Python 2.5 and Jython 2.5 buildbot
> (this will be done by me or Tiago)
> (1) Disable the Python 2.5 target in TravisCI, see
> (this is a simple one line edit to the .travis.yml file)
Done by Wayne,
> (2) Remove all the with statement imports (and any
> comment lines associated with them):
> from __future__ import with_statement
Done by Wayne,
> (3) Remove Bio/_py3k/_namedtuple.py and adjust
> import lines accordingly
Any new volunteer want to try this?
> (4) Scan over the code base looking for any comments
> about Python 2.5 (e.g. using the grep command), and
> reviewing them one by one to see if there is an old
> workaround we can now remove.
Lenna had a quick look, there should be some easy one here.
> (5) More advanced code review, for example looking
> for places we can better take advantage of context
> managers (with statements) for file handles.
Another new one, related to (5), and fairly easy:
(6) Reviewing examples in the docstrings and Tutorial
where it would make sense to use a 'with' for file handles.
This should also solve many of the ResourceWarning:
unclosed file ... warnings visible running the full test
suite under Python 3, e.g. see:
More information about the Biopython-dev