[issue42495] socket.gethostbyaddr raises error if invalid unicode in hosts

Christian Heimes report at bugs.python.org
Sun Nov 29 15:28:22 EST 2020


Christian Heimes <lists at cheimes.de> added the comment:

I cannot reproduce the issue on Linux:

# echo "127.0.0.2 xn-9q8h" >> /etc/hosts
# python3.8
>>> import socket
>>> socket.gethostbyaddr("127.0.0.2")
('xn-9q8h', [], ['127.0.0.2'])

----------
nosy: +christian.heimes
versions:  -Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42495>
_______________________________________


More information about the Python-bugs-list mailing list