在python IDLE中输入此代码:
import requests
r = requests.get('https://api.github.com/user',auth=('user','pass'))
报错:
Warning (from warnings module):
File "D:\Program\python2.7\lib\site-packages\requests-2.7.0-py2.7.egg\requests\packages\urllib3\util\ssl_.py", line 90
InsecurePlatformWarning
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.
此提醒可直接忽略,或者将其删除。
参考如下:
http://fossies.org/diffs/requests/2.5.3_vs_2.6.0/requests/packages/urllib3/util/ssl_.py-diff.html