InsecurePlatformWarning on OSX 10.10.3
Closed this issue · 6 comments
after running manager.get_all_droplets()
, I get the following error:
/Library/Python/2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: 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.
InsecurePlatformWarning
For me it is working fine. Have you tried to look at this url as described in the error message?
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning
I think this is more connected to SSL and urllib, and not with python-digitalocean but let me know.
Why don't you try to run from another machine?
@koalalorenzo yea, I did, and I even tried to hack a work around: https://github.com/wjimenez5271/python-digitalocean/tree/ssl-py27. But I just realized that you're using requests, so there is a layer of abstraction between us and urllib
so this might not work. I'm looking into alternatives.
Ah, OK, just confirmed this suggestion holds true: http://stackoverflow.com/a/29202163/830426. So all that is needed is for the user to install those alternative SSL backends:
pip install pyopenssl ndg-httpsclient pyasn1
and requests will take care of the rest.
Perhaps I should create a PR to suggest that to the user if it detects that version of the platform? Thoughts?
this will also works...
pip install requests[security]
or you can disable the insecurePlatformWarning via the logging module:
import sys
import logging
if sys.version_info[:3] < (2, 7, 9):
logging.captureWarnings(True)
No reply after 20 days, and I don't think this is a bug related to python-digitalocean. In case feel free to re-open this issue 👍
Yeah, this bug can be solved using this
pip install pyopenssl ndg-httpsclient pyasn1