using requests with TLS doesn't give SNI support

I'm using requests to communicate with a django app but

When I try

    requests.get('', verify=True)

I get the error:

hostname '' doesn't match either of '*', ''

However, when I look at the browser, or the certificate looks fine and dandy.

My host suggested it was the lack of SNI support from requests (and Github seems to confirm that ). Has anyone found a work-around using requests?

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:

  • pyOpenSSL
  • idna