Skip to content

Add timeout support to NCBIWWW.qblast#5152

Open
dipankatanu wants to merge 5 commits intobiopython:masterfrom
dipankatanu:fix-network-timeouts
Open

Add timeout support to NCBIWWW.qblast#5152
dipankatanu wants to merge 5 commits intobiopython:masterfrom
dipankatanu:fix-network-timeouts

Conversation

@dipankatanu
Copy link

Description:
Added an optional timeout parameter to the qblast function to prevent infinite hangs during network requests. This allows users to specify a timeout (in seconds) that is passed directly to urllib.request.urlopen.

handle = urlopen(request)
# Adding a timeout
handle = urlopen(request, timeout=timeout)
# handle = urlopen(request)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the comment lines.
Can the timeout parameter also be added to the qblast function in Bio/Blast/__init__.py?

@peterjc
Copy link
Member

peterjc commented Jan 26, 2026

You need to remove the PDB changes too, which look to be from #5149 (a duplicate of work on another PR just merged giving the conflict here now).

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