This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients gvanrossum, loewis, ncoghlan, neologix, pitrou, serhiy.storchaka, vstinner
Date 2014-08-05.11:12:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1407237178.09.0.481711982927.issue22127@psf.upfronthosting.co.za>
In-reply-to
Content
Serhiy: your patch still changes the type of exception, for 

s.sendto(b'hello',(u'thisisaverylongstringthisisaverylongstringthisisaverylongstringthisisaverylongstring', 4242))

You get a UnicodeError now, but a socket.gaierror then. This is because the name encodes fine as ascii, but still violates the IDNA requirement on label length. My patch does the same. I don't see where your and my patch differ in behavior.

But I agree that your patch is certainly much simpler, while mine might be slightly faster (for not creating copies of the host name).

I'm fine with either being applied. Antoine?
History
Date User Action Args
2014-08-05 11:12:58loewissetrecipients: + loewis, gvanrossum, ncoghlan, pitrou, vstinner, neologix, serhiy.storchaka
2014-08-05 11:12:58loewissetmessageid: <1407237178.09.0.481711982927.issue22127@psf.upfronthosting.co.za>
2014-08-05 11:12:58loewislinkissue22127 messages
2014-08-05 11:12:57loewiscreate