Message256514
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. |
|
Date |
User |
Action |
Args |
2015-12-16 08:03:52 | spaceone | set | recipients:
+ spaceone, vstinner, ezio.melotti |
2015-12-16 08:03:52 | spaceone | set | messageid: <1450253032.62.0.362649983897.issue25880@psf.upfronthosting.co.za> |
2015-12-16 08:03:52 | spaceone | link | issue25880 messages |
2015-12-16 08:03:51 | spaceone | create | |
|