[issue3461] smtplib does not fully support IPv6 in EHLO
Derek Morr derekm...@psu.edu added the comment: I'm not sure how to best write a unit test for this. The patch should only be invoked if the client doesn't have a name-served hostname and has IPv6 enabled. Also, there are several IPv4-isms in the smtplib tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3461 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3461] smtplib does not fully support IPv6 in EHLO
Derek Morr derekm...@psu.edu added the comment: You're right. My mistake when I made the patch. I've attached a new one without the trailing else -- Added file: http://bugs.python.org/file17863/smtplib.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3461 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5625] test_urllib2 fails - urlopen error file not on local host
Changes by Derek Morr derekm...@psu.edu: -- nosy: +dmorr ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1664] nntplib is not IPv6-capable
Derek Morr derekm...@psu.edu added the comment: Thanks. Is there any chance of getting bug 1655 fixed as well? imaplib has the same issue as nntplib, and the patch is identical. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1664 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1664] nntplib is not IPv6-capable
Derek Morr derekm...@psu.edu added the comment: Any chance of this being applied soon? It's been sitting in the bugtracker for over a year now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1664 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5111] httplib: wrong Host header when connecting to IPv6 litteral URL
Changes by Derek Morr derekm...@psu.edu: -- nosy: +dmorr ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1664] nntplib is not IPv6-capable
Derek Morr derekm...@psu.edu added the comment: I'm confused by that. In order to apply a 3 line patch (which replaces one standard library function with another), you want an entire test suite written for nntplib? If we're willing to accept that nttplib works reasonably well now, why is the testsuite necessary? socket.create_connection() is already used in several other modules. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1664 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support
Derek Morr derekm...@psu.edu added the comment: Senthil, I don't think your gethost_addrinfo() function will work. On a v6- enabled machine, it will only return v6 or v4 names. Shouldn't it return both (since a machine could have both v4 and v6 addresses)? For example, on my machine, I have the following addresses for localhost: ::1, fe80::1%lo0, 127.0.0.1. Also, why is the AI_CANONNAME flag set? The canonname field isn't used. And you only appear to take the last IP address returned (sa[0]). Shouldn't you return all the addresses? -- nosy: +dmorr ___ 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
[issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support
Derek Morr derekm...@psu.edu added the comment: Question: Why does FTPHandler.ftp_open() try to resolve the hostname()? The hostname will be passed into connect_ftp(), then into urllib.ftpwrapper(), and eventually into ftplib.FTP.connect(), which is IPv6-aware. ___ 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
[issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support
Derek Morr derekm...@psu.edu added the comment: My understanding is that the FileHandler checks if the file:// URL contains the hostname or localhost IP of the local machine (isn't that what FileHandler.names is for?). So, shouldn't the following URLs all open the same file: file:///foo.txt file://localhost/foo.txt file://127.0.0.1/foo.txt file://[::1]/foo.txt If that is the case, then doesn't FileHandler.names need to have all of those values in it? 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? 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. ___ 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
[issue1664] nntplib is not IPv6-capable
Derek Morr derekm...@psu.edu added the comment: 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=54546view=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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1664 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3461] smtplib does not fully support IPv6 in EHLO
New submission from Derek Morr [EMAIL PROTECTED]: On an IPv6-only machine, smtplib does not send an IPv6 address in the EHLO. It sends EHLO [0.0.0.0] instead. For example, on a v6-only network with stateless autoconfiguration enabled (a common configuration), smtplib will show this error. Further, SMTP's __init__() method tries to determine the value of EHLO parameter before the socket is established. But it can't know what value to use before the socket is setup (e.g., should it use a hostname, a v4 address literal, or a v6 address literal). The attached patch moves the self.local_hostname processing into the connect() method, and updates it to use IPv6-aware resolver interfaces. -- components: Library (Lib) files: python_smtplib.patch keywords: patch messages: 70372 nosy: dmorr severity: normal status: open title: smtplib does not fully support IPv6 in EHLO type: behavior versions: Python 3.1 Added file: http://bugs.python.org/file11000/python_smtplib.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3461 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1664] nntplib is not IPv6-capable
New submission from Derek Morr: nntplib hardcodes AF_INET for the socket address family. This prevents it from using IPv6. Attached is a patch that converts NNTP.__init__() to use socket.create_connection(), which is IPv6-capable. -- components: Library (Lib) files: nntplib_ipv6.patch messages: 58822 nosy: dmorr severity: normal status: open title: nntplib is not IPv6-capable type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file9001/nntplib_ipv6.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1664 __ nntplib_ipv6.patch Description: Binary data ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1655] imaplib is not IPv6-capable
Derek Morr added the comment: I think it makes more sense to use socket.create_connection(), which performs the getaddrinfo call. It makes the patch against imaplib more compact. I've attached a new patch that uses create_connection() Added file: http://bugs.python.org/file9004/imaplib_ipv6.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1655 __ imaplib_ipv6.patch Description: Binary data ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1654] HTTPSConnection is not IPv6-capable
New submission from Derek Morr: httplib.HTTPSConnection is not IPv6-capable, even though httplib.HTTPConnection is. HTTPSConnection has its own connect() method which does not call socket.getaddrinfo(). -- components: Library (Lib) messages: 58769 nosy: dmorr severity: normal status: open title: HTTPSConnection is not IPv6-capable versions: Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1654 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1655] imaplib is not IPv6-capable
New submission from Derek Morr: imaplib.IMAP4 and IMAP4_SSL do not use IPv6-capable name resolution APIs. Attached is a patch (lifted from httplib) that enables IPv6 in their open() methods. -- components: Library (Lib) files: imaplib_ipv6.patch messages: 58775 nosy: dmorr severity: normal status: open title: imaplib is not IPv6-capable versions: Python 2.5 Added file: http://bugs.python.org/file8987/imaplib_ipv6.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1655 __ imaplib_ipv6.patch Description: Binary data ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1654] HTTPSConnection is not IPv6-capable
Derek Morr added the comment: My apologies. This should have been filed against Python 2.3. I see it was fixed with checkin 54546. Go ahead and close this bug. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1654 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com