Senthil <orsent...@gmail.com> added the comment: > I am a little confused by this though. It looks like > FileHandler.file_open() checks if there is a hostname in the URL, and > if so, uses FTPHandler instead. So why does FileHandler.open_local_file > check the hostname value?
You are right. Even I had observed this, but did not dispute it. Let me try to look into the history to see why it so. Perhaps it needs to change. > For your other points, gethostbyname() in libc can only handle IPv4 > addresses. The IETF defined the getaddrinfo() interface as an IP > version neutral replacement. I would recommend using getaddrinfo(). > Yes, FTPHandler creates an urllib.FTPWrapper object. That object calls > into ftplib, which is already IPv6-capable. So, I don't think we need > to do hostname resolution in FTPHandler. Thanks for the info. I shall look into both in revision of the path. 1) using getaddrinfo() for IP version neutral call. 2) passing the hostname directly to ftplib. ( I am not sure of consequences, need to investigate). _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1675455> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com