Martin v. Löwis <mar...@v.loewis.de> added the comment: > Ah, I wondered if it was something like that > (encoding=>UnicodeError). It's not really a *unicode* error, it's a > syntax error in the domain name construction (ie: it is invalid > whether or not unicode is involved, it just isn't caught in 2.x for > non-unicode domain names), but oh well.
It's perhaps dubious whether IDNA is an encoding at all. Punycode certainly is, but IDNA only applies to (DNS) names. However, if you take the stance that IDNA converts Unicode names into bytes names, and is therefore an encoding, then this encoding is undefined for certain Unicode strings. If the encoding is undefined, the exception is a UnicodeError (unless there are errors in the code of the codec itself, such as MemoryErrors, but that's not the case here). ---------- title: socket.create_connection error message for domain subpart with invalid length is very confusing -> socket.create_connection error message for domain subpart with invalid length is very confusing _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9682> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com