Repository navigation
Add optional authentication for qblast - #1819
sorsaffari wants to merge 5 commits into
Conversation
|
|
||
| # On Python 3 urllib, urllib2, and urlparse were merged: | ||
| from urllib.request import urlopen, Request, urlretrieve, urlparse, urlcleanup | ||
| from urllib.request import urlopen, Request, urlretrieve, urlparse, urlcleanup, HTTPPasswordMgrWithDefaultRealm, HTTPBasicAuthHandler, build_opener, install_opener |
There was a problem hiding this comment.
Where do you import these from on Python 2.7?
There was a problem hiding this comment.
@peterjc This is day 3 of Python for me, so I do apologise for having overlooked this one.
Looks like urllib2 of Python 2.7 takes a whole different approach in authenticating the request and relies on base64 for encoding the credentials.
Since there is the question of implementation differences, I suppose the check on Python version along with authenticating the request(s), would have to take place in the NCBIWWW.py itself? That would not be clean though 😕
|
We've been lucky so far in Python 2 vs 3 differences, but this has likely been been in part from avoiding new things in Python 3 only. I don't know enough about urllib credentials to have an expert opinion here. |
Closes issue biopython#1879, part of biopython#898. The original author Jeff Chang and contributors since as recorded in version control have agreed: - Fábio Madeira (@biomadeira) biopython#898 (comment) - Benjamin Vaisvil (@bvaisvil) biopython#1613 - Carlos Pena (@carlosp420) biopython#898 (comment) - Chang Soon Ong (@chengsoonong) biopython#1879 (comment) - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Christiam Camacho (@christiam) biopython#898 (comment) - Christopher Jenness (@christopherjenness) biopython#1535 - Iddo Friedberg (@idoerg) biopython#898 (comment) - Jeff Chang (@jefftc) biopython#898 (comment) - Michiel de Hoon (@mdehoon) biopython#898 (comment) - Jay Bird (@mxposed) biopython#1470 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Nick Semenkovich (@semenko) biopython#898 (comment) - Sjoerd de Vries biopython#1879 (comment) - Soroush Saffari (@sorsaffari) biopython#1819 - Suresh Panneerselvam (@Amrithasuresh) biopython#1575 - Vincent Davis (@vincentdavis) biopython#898 (comment) The one exception is Chris Wroe, who we have not been able to contact, but their small contribution from Feb 2004 was later deprecated and removed in 2007.
Closes issue #1879, part of #898. The original author Jeff Chang and contributors since as recorded in version control have agreed: - Fábio Madeira (@biomadeira) #898 (comment) - Benjamin Vaisvil (@bvaisvil) #1613 - Carlos Pena (@carlosp420) #898 (comment) - Chang Soon Ong (@chengsoonong) #1879 (comment) - Christian Brueffer (@cbrueffer) #898 (comment) - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Christiam Camacho (@christiam) #898 (comment) - Christopher Jenness (@christopherjenness) #1535 - Iddo Friedberg (@idoerg) #898 (comment) - Jeff Chang (@jefftc) #898 (comment) - Michiel de Hoon (@mdehoon) #898 (comment) - Jay Bird (@mxposed) #1470 (comment) - Peter Cock (@peterjc) #898 (comment) - Nick Semenkovich (@semenko) #898 (comment) - Sjoerd de Vries #1879 (comment) - Soroush Saffari (@sorsaffari) #1819 - Suresh Panneerselvam (@Amrithasuresh) #1575 - Vincent Davis (@vincentdavis) #898 (comment) The one exception is Chris Wroe, who we have not been able to contact, but their small contribution from Feb 2004 was later deprecated and removed in 2007.
|
It seems that remote Blast has moved to the cloud, and qblast doesn't exist any more. This page: https://ncbi.github.io/blast-cloud/ calls the Blast AMI deprecated and no longer supported, and |
|
superseded by #4149 |

NSBI BLAST on the cloud by default requires authentication.
This pull request allows the developer to pass the
usernameandpasswordas parameters of theqblast()method. The credentials are then used in creating an HTTPBasicAuthHandler that in turn creates and authenticatedopenerfor requests against a BLAST instance on the cloud.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 and understand that AppVeyor andTravisCI will be used to confirm the Biopython unit tests and
flake8stylechecks 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.)