Skip to content

StopIteration fixes for Python 3.7 - #1695

Merged
peterjc merged 3 commits into
biopython:masterfrom
peterjc:stop_iteration
Jun 22, 2018
Merged

peterjc merged 3 commits into
biopython:masterfrom
peterjc:stop_iteration

Conversation

@peterjc

@peterjc peterjc commented Jun 21, 2018

Copy link
Copy Markdown
Member

This pull request addresses issue #1693 (or at least, the non-ARM parts of it).

As far as I can tell, the remaining instances of raise StopIteration are safe
(e.g. within __next__ methods which is appropriate).

I hereby agree to dual licence this and any previous contributions under both
the Biopython License Agreement AND the BSD 3-Clause License.

I have read the CONTRIBUTING.rst file and understand that AppVeyor and
TravisCI will be used to confirm the Biopython unit tests and flake8 style
checks pass with these changes.

I have added my name to the alphabetical contributors listings in the files
NEWS.rst and CONTRIB.rst as part of this pull request, am listed
already, or do not wish to be listed. (This acknowledgement is optional.)

peterjc added 3 commits June 21, 2018 16:12
Still using this as an internal end-of-file, thus
end-of-iteration signal, which is perhaps not ideal.

See https://www.python.org/dev/peps/pep-0479/
Reported as Biopython GitHub issue biopython#1693 via Fedora
packaging work for Python 3.7.

The StopIteration from the Nexus comment parsing could
propogate up to AlignIO and cause a failure there too.
See:

biopython#1693

This is in some way triggered by the changes for PEP479,
where inappropriate StopIteration exceptions get turned
into RuntimeError exceptions instead, see:

https://www.python.org/dev/peps/pep-0479/
@peterjc

peterjc commented Jun 21, 2018

Copy link
Copy Markdown
Member Author

@cbrueffer (cross reference #1327) or @odoublewen (see #1001), could you review this please? Ideally ASAP, as I'd like to include it in Biopython 1.72 which I hoped to release tomorrow.

@codecov

codecov Bot commented Jun 21, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #1695 into master will increase coverage by 1.27%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1695      +/-   ##
==========================================
+ Coverage   84.25%   85.53%   +1.27%     
==========================================
  Files         326      327       +1     
  Lines       49997    50052      +55     
==========================================
+ Hits        42126    42813     +687     
+ Misses       7871     7239     -632
Impacted Files Coverage Δ
Bio/Nexus/Nexus.py 72.5% <100%> (+0.04%) ⬆️
Bio/bgzf.py 94.61% <100%> (+0.06%) ⬆️
Bio/PDB/mmtf/DefaultParser.py 100% <0%> (ø)
Bio/Restriction/Restriction.py 83.38% <0%> (+0.56%) ⬆️
Bio/Entrez/Parser.py 82.25% <0%> (+0.62%) ⬆️
Bio/SCOP/__init__.py 61.42% <0%> (+0.62%) ⬆️
Bio/Application/__init__.py 87.35% <0%> (+0.79%) ⬆️
Bio/PDB/Residue.py 81.01% <0%> (+2.53%) ⬆️
Bio/SeqIO/IgIO.py 94.59% <0%> (+2.7%) ⬆️
Bio/Phylo/_io.py 94.44% <0%> (+2.77%) ⬆️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d59d74a...86eb227. Read the comment docs.

@peterjc
peterjc merged commit 6e357d4 into biopython:master Jun 22, 2018
@peterjc
peterjc deleted the stop_iteration branch June 22, 2018 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant