requests\packages\urllib3\util\ssl_.py:100:insecureplatformwarning:
A true Sslcontext object is not available. This prevents URLLIB3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html
#insecureplatformwarning.
Recently, in writing a crawler, the front with flask and jinja2 and Python MySQL connection to do the next simple data interaction login verification, compared to the Java struts such control, indeed Python is simpler.
Why use Python, once I use Java to decrypt a thing, a half-day solution does not come out, base64 write up is also a mess, to Java8 comes with. After using Python, the next two lines of code are tried.
When using requests, Access is the HTTPS type of URL, because HTTPS with SS encryption, will be reported this insecureplatformwarning, platform non-security warning, probably with HTTPS, and then checked the next solution.
URL of the direct warning message https://urllib3.readthedocs.org/en/latest/security.html
Insecureplatformwarning
New in version 1.11.
Certain python platforms (specifically, versions of Python earlier than 2.7.9) has restrictions in their SSL module that Limit the configuration that URLLIB3 can apply. In particular, this can cause HTTPS requests that would succeed on more featureful platforms to fail, and can cause Certai n security features to be unavailable.
If you encounter this warning, it's strongly recommended you upgrade to a newer Python version, or so you use Pyopenssl As described in the Openssl/pyopenssl section.
The SSL module that restricts the configuration applied by the URLLIB3 is limited in some Python versions (especially before 2.7.9), specifically, which causes the HTTPS request to succeed on a more functional platform and cause some security function modules to fail.
If you encounter this warning, it is highly recommended to upgrade to a higher version of the Python version, or in the Openssl/pyopenssl section described, you will use Pyopenssl.
https://github.com/plotly/plotly.py/issues/339
Follow the article's workaround, use pip install requests[security], and no more warnings after installation.
This will install the PYOPENSSL,NDG-HTTPSCLIENT,PYASN1.
Before using this command, the Python environment will first install PIP. Pip is a tool for installing the management Python package.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
The requests\packages\urllib3\util\ssl_.py:100:insecureplatformwarning of Python problems