Skip to content

Removing version check for python2 from files - #2520

Merged
peterjc merged 6 commits into
biopython:masterfrom
lorforlinux:rmpy2_verinfo
Jan 9, 2020
Merged

peterjc merged 6 commits into
biopython:masterfrom
lorforlinux:rmpy2_verinfo

Conversation

@lorforlinux

Copy link
Copy Markdown
Contributor

This pull request addresses issue #2490

  • 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, have run flake8 locally, and
    understand 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.rst and CONTRIB.rst as part of this pull request, am listed
    already, or do not wish to be listed. (This acknowledgement is optional.)

Comment thread Tests/test_SeqIO_SeqXML.py Outdated

# TODO - Fix this failure under Windows with Python 3.1 and 3.2
if not (sys.platform == "win32" and sys.version_info[0] >= 3):
if not sys.platform == "win32":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this? Maybe this is a good time to find out.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean remove it, and see if AppVeyor breaks? Or do either of you have access to a Windows machine or two for testing?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do keep this if-statement, it would be nicer as:

if sys.platform != "win32":

@lorforlinux lorforlinux Jan 9, 2020 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I don't know about this one that's why in this comment I said that it is a special one for me because I use Linux.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am testing this on a Windows machine. will let you know the results in a while :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so it looks like some Windows weirdness is still there, even on Python 3. That might deserve a followup issue, but if sys.platform != "win32": is enough for this pull request.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterjc can you give me some hints for solving those weird errors I am getting in windows? I want to give help for windows compatibility also.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original workaround was added 8 years ago:
0fab81a

I don't immediately recall any more details - hopefully I know a little more about encodings than I did then.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will try solving the problems thanks for the lead 😇

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It caught @mdehoon's eye - turns out to be similar to something he worked on recently in the Entrez parser - see pull request #2525

@codecov

codecov Bot commented Jan 9, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #2520 into master will decrease coverage by 0.13%.
The diff coverage is 16.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2520      +/-   ##
==========================================
- Coverage    84.9%   84.77%   -0.14%     
==========================================
  Files         321      320       -1     
  Lines       52965    52372     -593     
==========================================
- Hits        44970    44398     -572     
+ Misses       7995     7974      -21
Impacted Files Coverage Δ
Bio/SeqIO/__init__.py 83.88% <ø> (-2.44%) ⬇️
Bio/SeqIO/Interfaces.py 79.16% <ø> (-5.93%) ⬇️
Bio/SeqRecord.py 93.6% <ø> (-0.49%) ⬇️
Bio/Seq.py 98.19% <ø> (-0.11%) ⬇️
Bio/Entrez/__init__.py 45.33% <0%> (ø) ⬆️
Bio/TogoWS/__init__.py 15.54% <11.11%> (-0.44%) ⬇️
Bio/ExPASy/__init__.py 50% <20%> (-3.85%) ⬇️
Bio/KEGG/REST.py 14.49% <25%> (-0.44%) ⬇️
... and 2 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 ed1c5cf...0ba3a31. Read the comment docs.

@lorforlinux lorforlinux changed the title Rmpy2 verinfo Removing version check for python2 from files Jan 9, 2020

# TODO - Fix this failure under Windows with Python 3.1 and 3.2
if not (sys.platform == "win32" and sys.version_info[0] >= 3):
if sys.platform != "win32":

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd have expected flake8 to say there should still be a blank line here...

@peterjc
peterjc merged commit bf75689 into biopython:master Jan 9, 2020
@peterjc

peterjc commented Jan 9, 2020

Copy link
Copy Markdown
Member

Thank you!

@lorforlinux
lorforlinux deleted the rmpy2_verinfo branch January 26, 2020 17:19
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.

4 participants