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

2020-11-30 Thread Peter Hunt
Peter Hunt added the comment: Ah, I just realised it may have been a different dash to the one that can be typed with the keyboard. >From the wiki article (https://en.wikipedia.org/wiki/Dash), using either the >"en" or "em" dash will cause t

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

2020-11-28 Thread Peter Hunt
New submission from Peter Hunt : If the hosts file contains invalid unicode, then the socket module will break when attempting to get the list of hosts. This renders modules such as Flask and Django unusable. Background: I had a mapping to localghost (https://twitter.com/rfreebern