Skip to content

Rm urllib - #2476

Merged
peterjc merged 10 commits into
biopython:masterfrom
lorforlinux:rm-urllib
Jan 4, 2020
Merged

peterjc merged 10 commits into
biopython:masterfrom
lorforlinux:rm-urllib

Conversation

@lorforlinux

Copy link
Copy Markdown
Contributor

This pull request addresses issue #...

  • 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.)

@codecov

codecov Bot commented Dec 31, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #2476 into master will not change coverage.
The diff coverage is 32.5%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2476   +/-   ##
=======================================
  Coverage   84.77%   84.77%           
=======================================
  Files         322      322           
  Lines       52460    52460           
=======================================
  Hits        44475    44475           
  Misses       7985     7985
Impacted Files Coverage Δ
Bio/SCOP/__init__.py 61.34% <0%> (ø) ⬆️
Bio/motifs/__init__.py 83.27% <0%> (ø) ⬆️
Bio/ExPASy/__init__.py 53.84% <20%> (ø) ⬆️
Bio/TogoWS/__init__.py 15.97% <28.57%> (ø) ⬆️
Bio/PDB/PDBList.py 16.98% <33.33%> (ø) ⬆️
Bio/Blast/NCBIWWW.py 12.76% <33.33%> (ø) ⬆️
Bio/Graphics/KGML_vis.py 68.75% <50%> (ø) ⬆️
Bio/KEGG/REST.py 14.92% <50%> (ø) ⬆️
Bio/ExPASy/ScanProsite.py 29.68% <50%> (ø) ⬆️

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 38a83c5...6e70732. Read the comment docs.

@peterjc

peterjc commented Dec 31, 2019

Copy link
Copy Markdown
Member

Cross reference issue #2420

@peterjc peterjc left a comment

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.

Looks good - although I would probably squash-and-merge this into one commit as the changes are all so similar.

@lorforlinux

Copy link
Copy Markdown
Contributor Author

@peterjc what is the cross-reference issue?

@lorforlinux

lorforlinux commented Dec 31, 2019 •

Copy link
Copy Markdown
Contributor Author

oh okay i got it now, at first i thought my code has some issue, really very sorry for bothering you.

@peterjc

peterjc commented Dec 31, 2019

Copy link
Copy Markdown
Member

On the pull request template, I expected you to fill in this line:

This pull request addresses issue #...

to read:

This pull request addresses issue #2420

I could have edited your pull request description, but added the issue number in a comment instead. Either way we get an automatic link shown on the issue to this pull request, so anyone looking there is aware of this work.

Can you suggest how better to reword the template to better guide people?

@lorforlinux

Copy link
Copy Markdown
Contributor Author

First of all, I think it is my lack of attention to things that led to this mistake and when I submitted the pull request I should have read every bit carefully but now I know.

Can you suggest how better to reword the template to better guide people?

The pull request template is more than fine and I guess instead of Cross reference issue #1234 you can write the same thing people have missed i.e This pull request addresses issue #1234 with a message reminding of the mistake they have done. I checked and I missed it in the last pull request too, if I have got a comment on that I have not done the mistake again. I will try to be more attentive while doing things. Thank you so much for making me a better contributor.

@peterjc

peterjc commented Dec 31, 2019

Copy link
Copy Markdown
Member

I'll leave this open another day or so in case anyone else wants to review it.

There's a trivial merge conflict, and assuming we merge #2478 next there will be another one.

@peterjc

peterjc commented Jan 1, 2020

Copy link
Copy Markdown
Member

Squashed and rebased...

Comment thread Bio/Blast/NCBIWWW.py Resolved
Comment thread Bio/Entrez/Parser.py Resolved
Comment thread Bio/Entrez/__init__.py Resolved
Comment thread Bio/ExPASy/ScanProsite.py Resolved
Comment thread Bio/ExPASy/__init__.py Resolved
Comment thread Bio/Graphics/KGML_vis.py Resolved
Comment thread Tests/run_tests.py
raise RuntimeError("Internal test suite error, attempting to use internet despite --offline setting")

Bio._py3k.urlopen = dummy_urlopen
urllib.urlopen = dummy_urlopen

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 really need this?

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.

Yes - it is to make sure --offline is actually working.

@peterjc

peterjc commented Jan 1, 2020

Copy link
Copy Markdown
Member

@mdehoon with the Entrez conflicts done, are you in favour of merging this now?

@mdehoon

mdehoon commented Jan 2, 2020

Copy link
Copy Markdown
Contributor

As the underscores were added as part of _py3k, they should be addressed as part of the removal of _py3k.

@peterjc

peterjc commented Jan 3, 2020

Copy link
Copy Markdown
Member

@mdehoon Since this contributed pull request doesn't change the underscore status quo, and just does what I was suggesting in #2420, and we merge it now please?

And yes, these particular leading underscores were added as part of the introduction of Bio._py3k (mostly if not all by me, e.g. fa6fe3a), but as I described on #2483 it was deliberate, and to me this is a quite separate issue.

@mdehoon

mdehoon commented Jan 4, 2020

Copy link
Copy Markdown
Contributor

@peterjc What I meant was that because the underscores were added as part of _py3k as a temporary measure, and were not discussed or agreed upon to be a permanent feature of Biopython, the underscores should be removed in this PR. Then in #2483 we can discuss as a separate issue whether underscores should be added to all local imports.

@peterjc

peterjc commented Jan 4, 2020

Copy link
Copy Markdown
Member

@mdehoon @deepaklorkhatri007 OK then, remove the underscores on the lines changed in this pull request.

I still hope to convince you on #2483 to put them all back again, but I don't seem to be doing a good job articulating my concern.

@lorforlinux

Copy link
Copy Markdown
Contributor Author

I still hope to convince you on #2483 to put them all back again, but I don't seem to be doing a good job articulating my concern.

@peterjc if the imports without underscores create any problems in the future, I am happy to add them back to their respective places.

@peterjc

peterjc commented Jan 4, 2020

Copy link
Copy Markdown
Member

Michiel made a good point on #2483 about the Python standard library not being consistent on this point either, so I'm going to give up on the underscores here. As he says, there are more pressing things to work on.

@peterjc
peterjc merged commit 220ccca into biopython:master Jan 4, 2020
@peterjc

peterjc commented Jan 4, 2020

Copy link
Copy Markdown
Member

Merged, thank you!

@lorforlinux
lorforlinux deleted the rm-urllib branch January 5, 2020 01:47
@peterjc peterjc mentioned this pull request Jan 7, 2020
3 tasks done
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.

3 participants