Import socket.error so the code throws the correct exception
Update ssl_match_hostname to match new stdlib code that fixes a security issue with IDNA domains.
Look for the backports-ssl_match_hostname module from pypi before using our bundled/backported code
Added tag 1.2 for changeset 77921bbe3931
Bumped to 1.3 in preparation for next release.
Merge pull request #2 from abadger/feature/ssl-match-hostname-17997

There's apparently another security issue in the python3 match_hostname code. No CVE has been issued for it yet:

http://bugs.python.org/issue17997#msg194950

This merge includes two commits. The first updates the included match_hostname code to reflect what's in the python-3.3.3 and python-3.4 stdlib (with a minor change to preserve python2 compat). The second commit adds a check for the backports.ssl_match_hostname module from pypi: https://pypi.python.org/pypi/backports.ssl_match_hostname

If the stdlib doesn't have ssl_match_hostname but backports.ssl_match_hostname exists it uses that code. If neither one are present, then it uses the code included in setuptools.

Using backports.ssl_match_hostname helps system packagers and system admins to have a single place to maintain SSL support rather than every package that's copying the match_hostname code. On the other hand, it means that users won't get any fixes before they go into the backports.ssl_match_hostname module. Brandon Rhodes is the owner of that module and Toshio has done the last several releases to make sure that module is current with the match_hostname security issues.
Update changelog
Merge pull request #3 from abadger/feature/socket-exception-import

Import socket.error so the code throws the correct exception
Update changelog