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 spaceone
Recipients ezio.melotti, spaceone, vstinner
Date 2015-12-16.08:03:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450253032.62.0.362649983897.issue25880@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-12-16 08:03:52spaceonesetrecipients: + spaceone, vstinner, ezio.melotti
2015-12-16 08:03:52spaceonesetmessageid: <1450253032.62.0.362649983897.issue25880@psf.upfronthosting.co.za>
2015-12-16 08:03:52spaceonelinkissue25880 messages
2015-12-16 08:03:51spaceonecreate