[issue20418] socket.getaddrinfo fails for hostname that is all digits 0-9

2014-01-29 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue20418] socket.getaddrinfo fails for hostname that is all digits 0-9

2014-01-29 Thread Ariel Glenn
Ariel Glenn added the comment: Verified that with AF_INET instead of AF_UNSPEC I get the error from my c program. I'll take this to the glibc folks and see what's up. Thanks. -- ___ Python tracker ___

[issue20418] socket.getaddrinfo fails for hostname that is all digits 0-9

2014-01-28 Thread Charles-François Natali
Charles-François Natali added the comment: The culprint isn't Python, but the libc: """ $ ./python -c "import socket; print(socket.getaddrinfo('836937931829', 80, socket.AF_INET, 0, socket.SOL_TCP))" Traceback (most recent call last): File "", line 1, in socket.gaierror: [Errno -2] Name or s

[issue20418] socket.getaddrinfo fails for hostname that is all digits 0-9

2014-01-28 Thread Ariel Glenn
Ariel Glenn added the comment: Yes, I had checked that just in case; getaddrinfo(3) works for the all-digit hostname, returning no error. I'm using these hints: memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags

[issue20418] socket.getaddrinfo fails for hostname that is all digits 0-9

2014-01-28 Thread R. David Murray
R. David Murray added the comment: getaddrinfo is a thin wrapper around the system call. Have you tried the same thing in a C program and had it work? My guess would be that the all-numeric 'hostname' is being treated as the integer form of an IP address. I can't immediately find any documen

[issue20418] socket.getaddrinfo fails for hostname that is all digits 0-9

2014-01-28 Thread ariel-wikimedia
New submission from ariel-wikimedia: With python 2.7.5 (running on fedora 20 with all updates), socket.getaddrinfo for a hostname such as 836937931829 will fail. Docker produces these sorts of hostnames (really random hex strings, but some hex strings only contain digits 0-9). How to reprodu