Xavier de Gaye added the comment: Problems with the socket module on Android: API 21: a) Both getservbyname() and getservbyport() fail when the optional 'protocolname' parameter is not set to 'tcp' or 'udp'. b) getservbyname() fails when 'servicename' is set to 'http'. getaddrinfo() fails either when: c) 'port' is 'http'. d) Or the optional 'type' is not set to socket.SOCK_STREAM or socket.SOCK_DGRAM and 'port' is a string.
API 23: e) getservbyport() fails when the optional 'protocolname' parameter is not set to 'tcp' or 'udp'. IMHO case b) and c) are difficult to fix. For case d), one could use the Python implementation of getaddrinfo, but Android does not have the deprecated getipnodebyaddr(), so it is necessary to disable ipv6 in this case. Not sure if this is worth it. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26936> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com