New submission from SpaceOne: Python 3.4.2 (default, Oct 8 2014, 10:45:20) >>> u'..'.encode('idna') Traceback (most recent call last): File "/usr/lib/python3.4/encodings/idna.py", line 165, in encode raise UnicodeError("label empty or too long") UnicodeError: label empty or too long
The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long) → I was expecting that this raises either not at all or UnicodeEncodeError. >>> b'..'.decode('idna') '..' → Why doesn't this raise then, too? The error message is also messed up which wasn't the case in python 2.7. It could be cleaned up. ---------- components: Unicode messages: 256514 nosy: ezio.melotti, haypo, spaceone priority: normal severity: normal status: open title: u'..'.encode('idna') → UnicodeError: label empty or too long versions: Python 2.7, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25880> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com