bpo-28414: ssl module idna test by tiran · Pull Request #5395 · python/cpython
Looks good except for one minor comment.
I'm kind of confused about what your overall plan for this is right now – are you still planning to make sslsock.server_hostname be an A-label? Are you still planning to fix the SNI callback as discussed previously?
Should there also be tests for SSLObject's handling of server_hostname?