diff options
author | Moises Lopez - https://www.vauxoo.com/ <moylop260@vauxoo.com> | 2022-06-23 00:48:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-23 07:48:29 +0200 |
commit | 76bcfda64d4fef8706d06ad9458ef2461bf762a0 (patch) | |
tree | 91bac8f7e3beb70db207548fd649780e9f07fc1e /CONTRIBUTORS.txt | |
parent | 02e9023865419635f155d8c8a6dc1b14d5104d3c (diff) | |
download | pylint-git-76bcfda64d4fef8706d06ad9458ef2461bf762a0.tar.gz |
[ADD] missing-timeout: Used when a method call an external request (#6780)
Calling external request needs to use timeout in order to avoid waiting for a long time
You can even reproduce the case using deelay.me
e.g.
```python
import requests
response = requests.get("https://deelay.me/5000/http://localhost:80") # It will spend 5s
response = requests.get("https://deelay.me/5000/http://localhost:80", timeout=2) # timeout
response = requests.get("https://deelay.me/1000/http://localhost:80", timeout=2) # fine
```
After 2s if the request doesn't have response it raises the following exception
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='deelay.me', port=443): Read timed out. (read timeout=2)
But if it responses <=1s it is fine
Now you can test the same but using a bigger delay
Diffstat (limited to 'CONTRIBUTORS.txt')
-rw-r--r-- | CONTRIBUTORS.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index e6c4ffd54..574a7cebf 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -88,6 +88,7 @@ contributors: * Add consider-merging-isinstance, superfluous-else-return * Fix consider-using-ternary for 'True and True and True or True' case * Add bad-docstring-quotes and docstring-first-line-empty + * Add missing-timeout - Ville Skyttä <ville.skytta@iki.fi> - Pierre-Yves David <pierre-yves.david@logilab.fr> - David Shea <dshea@redhat.com>: invalid sequence and slice index |