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 dcantrell-rh
Recipients
Date 2007-03-07.05:19:06
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
A number of base Python modules use gethostbyname() when they should be using getaddrinfo().  The big limitation hit when using gethostbyname() is the lack of IPv6 support.

This first patch is for urllib2.py.  It replaces all uses of gethostbyname() with getaddrinfo() instead.  getaddrinfo() returns a 5-tuple, so additional code needs to wrap a getaddrinfo() call when replacing gethostbyname() calls.  Still should be pretty simple to read.

I'd like to see this patch added to the next stable release of Python, if at all possible.  I am working up patches for the other modules I see in the Lib/ subdirectory that could use getaddrinfo() instead of gethostbyname().
History
Date User Action Args
2007-08-23 15:57:19adminlinkissue1675455 messages
2007-08-23 15:57:19admincreate