pypa/pip — pull request #1226 by msabramo (2013-10-07 22:13:30+00:00)
Title: pip/vendor/distlib/compat.py: Use our own implementation of match_hostname if `from ssl import match_hostname` raises an ImportError.

This solves an error on Python 3.1:

```
File "/Users/marca/dev/git-repos/pip/pip/vendor/distlib/compat.py",
line 140, in
from ssl import match_hostname, CertificateError
ImportError: cannot import name match_hostname
```

I took the existing `match_hostname` unmodified and simply use it whenever `from ssl import match_hostname` raises an ImportError.