Suppress "InsecureRequestWarning" messages when disabling cert verification
See original GitHub issueIf cert verification is disabled via use of add_http_options({'verify': False})
, every REST API call will print a warning of the following form.
C:\Program Files (x86)\Python35-32\lib\site-packages\requests\packages\urllib3\connectionpool.py:838: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/security.html InsecureRequestWarning)
Since I explicitly disabled cert verification, these warnings are not useful and should be suppressed.
The interwebz tell me that this can be achieved by using the following setting
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Unverified HTTPS request is being made in Python2.6 - Stack ...
To disable warnings in requests' vendored urllib3, you'll need to import that ... The HTTPS certificate verification security measure isn't something to be ......
Read more >Suppress SSL certificate warnings when ssl_verify=False is set?
These InsecureRequestWarning warning messages show up when a request is made to an HTTPS URL without certificate verification enabled. try this.
Read more >How to disable InsecureRequestWarning: Unverified HTTPS ...
How to disable InsecureRequestWarning: Unverified HTTPS request is being made. If you use requests or urllib3, requests with SSL ...
Read more >Disable InsecureRequestWarning in Python - Codeigo
InsecureRequestWarning is a warning that occurs when a request is made without certificate verification. In Python, this warning happens for ...
Read more >3 Ways to Fix InsecureRequestWarning in Python
These InsecureRequestWarning warning messages show up when a request is made to an HTTPS URL without certificate verification enabled.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
On the recommendations front, I’ve got Let’s Encrypt, GlobalSign and SSL.com (based on the average reviews posted on SSL Shopper). Will that be sufficient?
development branch has been updated with the doc change that I made, so can we close this issue out now? 😃