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 dmorr
Recipients dmorr, giampaolo.rodola, morrowc
Date 2008-12-30.05:01:56
SpamBayes Score 4.6199865e-08
Marked as misclassified No
Message-id <1230613318.27.0.332005704491.issue1664@psf.upfronthosting.co.za>
In-reply-to
Content
Yes. The patch is against 2.6. It uses the socket.create_connection() 
helper function, which was added in 2.6. See http://svn.python.org/view?
rev=54546&view=rev for the commit message.

If you really want to apply it to 2.5, it's trivial to adapt the patch. 
Just replace the call to create_connection() with something like this:

    msg = "getaddrinfo returns an empty list"
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
        af, socktype, proto, canonname, sa = res
        sock = None
        try:
            sock = socket(af, socktype, proto)
            if timeout is not _GLOBAL_DEFAULT_TIMEOUT:
                sock.settimeout(timeout)
            sock.connect(sa)
            self.sock = sock

        except error, msg:
            if sock is not None:
                sock.close()

    raise error, msg
History
Date User Action Args
2008-12-30 05:01:58dmorrsetrecipients: + dmorr, giampaolo.rodola, morrowc
2008-12-30 05:01:58dmorrsetmessageid: <1230613318.27.0.332005704491.issue1664@psf.upfronthosting.co.za>
2008-12-30 05:01:57dmorrlinkissue1664 messages
2008-12-30 05:01:56dmorrcreate