[issue18109] os.uname() crashes if hostname contains non-ascii characters

STINNER Victor report at bugs.python.org
Mon Jun 3 22:36:20 CEST 2013


STINNER Victor added the comment:

test_logging is failing with a non-ASCII hostname because of the following error:

error: uncaptured python exception, closing channel <test.test_logging.TestSMTPServer listening localhost:0 at 0x7f09a0ef89b0> (<class 'UnicodeEncodeError'>:'ascii' codec can't encode character '\xe9' in position 6: ordinal not in range(128) [/home/haypo/prog/python/default/Lib/asyncore.py|read|83] [/home/haypo/prog/python/default/Lib/asyncore.py|handle_read_event|436] [/home/haypo/prog/python/default/Lib/asyncore.py|handle_accept|513] [/home/haypo/prog/python/default/Lib/test/test_logging.py|handle_accepted|746] [/home/haypo/prog/python/default/Lib/test/test_logging.py|__init__|692] [/home/haypo/prog/python/default/Lib/smtpd.py|push|276])

SMTPChannel.push() uses explicitly the ASCII encoding, whereas test_logging pass the FQDN to push().

I'm not interested to work on this issue. Please open a new issue if you consider important enough.

--

More tests are also failing with *undecodable* hostnames (ex: "aé€\udcff" with UTF-8 locale encoding): test_socket test_urllib test_urllib2 test_logging test_pydoc test_smtplib.

I fixed and closed the issue, even I still think that you should only use ASCII for your hostname ;-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18109>
_______________________________________


More information about the Python-bugs-list mailing list