using requests with TLS doesn't give SNI support
The current version of Requests should be just fine with SNI. Further down the GitHub issue you can see the requirements:
Try installing those packages and then give it another shot.
EDIT: As of Requests v2.12.1, ndg-httpsclient and pyasn1 are no longer required. The full list of required packages is now:
In order for me to get the accepted answer to work, I had to install a bunch of other packages, in this order:
- yum install libffi-devel
- yum install gcc
- yum install openssl-devel
- pip install urllib3
- pip install pyopenssl
- pip install ndg-httpsclient
- pip install pyasn1
Install requests module like this. This will install the security package extras.
pip install requests[security]