This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rganesan
Recipients
Date 2005-09-06.04:46:23
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
======
getaddrinfo(host, port[, family[, socktype[, proto[,
flags]]]])
    Resolves the host/port argument, into a sequence of
5-tuples that contain all the necessary argument for
the sockets manipulation. host is a domain name, a
string representation of IPv4/v6 address or None. port
is a string service name (like 'http'), a numeric port
number or None.
======

On Linux (and FreeBSD and probably other IPv6 enabled
hosts), port as a number raises a socket exception

======
 $ python2.4
Python 2.4.1 (#2, May  5 2005, 11:32:06)
[GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> import socket
>>> socket.getaddrinfo('6bone.net', 'http')
[(10, 1, 6, '', ('2001:5c0:0:2::24', 80, 0, 0)), (2, 1,
6, '', ('209.71.226.24', 80))]
>>> socket.getaddrinfo('6bone.net', 80)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
socket.gaierror: (-8, 'Servname not supported for
ai_socktype')
======

Since, on Windows 2003 Server (no IPv6) and Solaris 2.8
(no IPv6), the call works correctly, I am filing this
bug as platform specific.
History
Date User Action Args
2008-01-20 09:58:08adminlinkissue1282647 messages
2008-01-20 09:58:08admincreate