Repository navigation
Use iter instead of getiterator for Python 3.9 compatibility. - #2774
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2774 +/- ##
==========================================
+ Coverage 83.97% 84.12% +0.14%
==========================================
Files 319 319
Lines 50341 50354 +13
==========================================
+ Hits 42276 42360 +84
+ Misses 8065 7994 -71
Continue to review full report at Codecov.
|
|
@tirkarthi Isn't |
|
iter is a method and is recommended to be used : https://bugs.python.org/issue36543 |
|
@tirkarthi OK then, thanks. |
|
|
|
These are different errors.
|
|
U flag error has been fixed with ba893ee |
|
I have pushed 9c2879e for getchildren related issues. Please test the same. |
Successfully tested with Python-3.9.0a4 |
|
Thanks :) |
peterjc
left a comment
There was a problem hiding this comment.
Thank you. This looks good, will leave this a couple of days in case anyone else want to review, then I think a squash-and-merge would be appropriate.
|
Thanks for the quick review :) |
| child_tags = list(node) | ||
| nodes = [] | ||
| edges = [] | ||
| for child in child_tags: |
There was a problem hiding this comment.
child_tags is no longer used. Why not iterate just node?
| for child in child_tags: | |
| for child in node: |
| end = int( | ||
| list(el.getiterator(NS + "end"))[0].attrib["position"] | ||
| ) | ||
| end = int(list(el.iter(NS + "end"))[0].attrib["position"]) |
There was a problem hiding this comment.
| end = int(list(el.iter(NS + "end"))[0].attrib["position"]) | |
| end = int(next(el.iter(NS + "end")).attrib["position"]) |
Co-authored-by: Serhiy Storchaka <[email protected]>
|
@serhiy-storchaka do you also agree to dual license your contributions? |
|
If we don't have the license permission from @serhiy-storchaka we'll have to revert that commit and merge without it. |
Yes, of course. I agree to dual license my contributions. Although they are trivial. |
|
Excellent, thank you all. Merging... |
Original author Ben Morris, and Frank Kauff, Cymon Cox and Eric Talvich on whose work it was partly based, and the other contributors since as recorded by version control have agrred: - Andrew Dalke (@adalke) http://mailman.open-bio.org/pipermail/biopython-dev/2013-August/019941.html - Bartek Wilczyński (@barwil) http://mailman.open-bio.org/pipermail/biopython/2018-August/016533.html - Ben Morris (@bendmorris) biopython#898 (comment) - Carlos Pena (@carlosp420) biopython#898 (comment) - Chris Rands (@chris-rands) biopython#1301 - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Cymon Cox (@cymon) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Frank Kauff (CVS username fkauff, on GitHub as @frankkl) biopython#2246 (comment) - Karthikeyan Singaravelan (@tirkarthi) biopython#2774 - Michiel de Hoon (@mdehoon) biopython#898 (comment) - @morrme biopython#1172 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Sergio Valqui (@svalqui) biopython#1749 - Sourav Singh (@souravsingh) biopython#957 - Suresh Panneerselvam (@Amrithasuresh) biopython#1575 - Thomas Hamelryck (CVS username nisse) https://mailman.open-bio.org/pipermail/biopython/2018-September/016546.html
Original author Ben Morris, and Frank Kauff, Cymon Cox and Eric Talvich on whose work it was partly based, and the other contributors since as recorded by version control have agrred: - Andrew Dalke (@adalke) http://mailman.open-bio.org/pipermail/biopython-dev/2013-August/019941.html - Bartek Wilczyński (@barwil) http://mailman.open-bio.org/pipermail/biopython/2018-August/016533.html - Ben Morris (@bendmorris) #898 (comment) - Carlos Pena (@carlosp420) #898 (comment) - Chris Rands (@chris-rands) #1301 - Christian Brueffer (@cbrueffer) #898 (comment) - Cymon Cox (@cymon) #898 (comment) - Eric Talevich (@etal) #898 (comment) - Frank Kauff (CVS username fkauff, on GitHub as @frankkl) #2246 (comment) - Karthikeyan Singaravelan (@tirkarthi) #2774 - Michiel de Hoon (@mdehoon) #898 (comment) - @morrme #1172 (comment) - Peter Cock (@peterjc) #898 (comment) - Sergio Valqui (@svalqui) #1749 - Sourav Singh (@souravsingh) #957 - Suresh Panneerselvam (@Amrithasuresh) #1575 - Thomas Hamelryck (CVS username nisse) https://mailman.open-bio.org/pipermail/biopython/2018-September/016546.html
Original author Ben Morris, and Frank Kauff, Cymon Cox and Eric Talvich on whose work it was partly based, and the other contributors since as recorded by version control have agrred: - Andrew Dalke (@adalke) http://mailman.open-bio.org/pipermail/biopython-dev/2013-August/019941.html - Bartek Wilczyński (@barwil) http://mailman.open-bio.org/pipermail/biopython/2018-August/016533.html - Ben Morris (@bendmorris) biopython#898 (comment) - Carlos Pena (@carlosp420) biopython#898 (comment) - Chris Rands (@chris-rands) biopython#1301 - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Cymon Cox (@cymon) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Frank Kauff (CVS username fkauff, on GitHub as @frankkl) biopython#2246 (comment) - Karthikeyan Singaravelan (@tirkarthi) biopython#2774 - Michiel de Hoon (@mdehoon) biopython#898 (comment) - @morrme biopython#1172 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Sergio Valqui (@svalqui) biopython#1749 - Sourav Singh (@souravsingh) biopython#957 - Suresh Panneerselvam (@Amrithasuresh) biopython#1575 - Thomas Hamelryck (CVS username nisse) https://mailman.open-bio.org/pipermail/biopython/2018-September/016546.html
This pull request addresses issue #2773
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.rstfile, have runflake8locally, andunderstand that AppVeyor and TravisCI will be used to confirm the Biopython unit
tests and style checks pass with these changes.
I have added my name to the alphabetical contributors listings in the files
NEWS.rstandCONTRIB.rstas part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)
Fixes #2773