Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No need to check httpx client without timeout defined #1177

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

ericwb
Copy link
Member

@ericwb ericwb commented Sep 27, 2024

Unlike python-requests, the httpx client has a default timeout of 5 seconds on its class and functions. As such, there is no need for Bandit to check for an undefined timeout. However, explicitly setting the timeout to None is still a potential problem as that would create a situtation where the client would block forever.

Fixes: #1175

Unlike python-requests, the httpx client has a default
timeout of 5 seconds on its class and functions. As such,
there is no need for Bandit to check for an undefined
timeout. However, explicitly setting the timeout to None
is still a potential problem as that would create a
situtation where the client would block forever.

Fixes: PyCQA#1175

Signed-off-by: Eric Brown <[email protected]>
@ericwb ericwb merged commit 071386b into PyCQA:main Oct 14, 2024
14 checks passed
@ericwb ericwb deleted the httpx_no_timeout branch October 14, 2024 16:20
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.

"Call to httpx without timeout" when httpx has timeout by default
2 participants