[Distutils] SNI support in pip

Donald Stufft donald at stufft.io
Mon Dec 1 13:58:31 CET 2014


> On Dec 1, 2014, at 7:40 AM, Wichert Akkerman <wichert at wiggy.net> wrote:
> 
> I just noticed that pip does not support SNI (on Python 2.7.8). This is a bit problematic for us since we use a private index on a server using SNI, and right pip always aborts with a certificate error. I found a year old ticket that seems related (https://github.com/pypa/pip/issues/1511 <https://github.com/pypa/pip/issues/1511> ) which suggested installing pyOpenSSL, pyasn1 and ndg-httpsclient as a workaround. This did not work for me either: I got a link error during installation.
> 
> I am wondering: with Python 2.7.9 about to be released with a backport of Python 3’s ssl module, can pip start supporting SNI without any external dependencies? That would be a huge help for people who need to use SNI.
> 
> Regards,
> Wichert.
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig


Yes, pip just uses requests to validate HTTPS. Requests gates the stdlib SNI stuff on whether or not the stdlib has SSLContext and the HAS_SNI variables. This should automatically work with 2.7.9.

---
Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20141201/11d3363a/attachment.html>


More information about the Distutils-SIG mailing list