[issue8857] socket.getaddrinfo needs tests

2010-08-16 Thread STINNER Victor
STINNER Victor added the comment: > Using www.google.com for IPv6 lookups is a bad idea (...) There is also ipv6.google.com -- nosy: +haypo ___ Python tracker ___ __

[issue8857] socket.getaddrinfo needs tests

2010-08-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: Using www.google.com for IPv6 lookups is a bad idea: whether or not you get an IPv6 address depends on whether your nameserver participates in "google over ipv6". www.python.org would be a better choice. -- ___ Py

[issue8857] socket.getaddrinfo needs tests

2010-08-16 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I think the main problem here is that it's not easy to write reliable tests that work across all platforms (getaddrinfo(host, 'ftp') returning UDP addresses on FreeBSD/Qemu only is an example). We might try to go a little deeper as you suggested but it's ve

[issue8857] socket.getaddrinfo needs tests

2010-08-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: There is one thing I don't understand about these tests: they basicly only seem to test if the function implements the right interface (argument counts and the structure of the return value). Shouldn't the tests also test if the behaviour is somewhat sane? O

[issue8857] socket.getaddrinfo needs tests

2010-08-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Thanks for the catch. Committed in r84089. I replaced it with socket.getaddrinfo(HOST, None, 0, 0, socket.SOL_TCP) though, so that the proto argument is tested. -- status: open -> closed ___ Python tracker

[issue8857] socket.getaddrinfo needs tests

2010-08-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: I think there is a missing '0' in the failing line: Index: Lib/test/test_socket.py === --- Lib/test/test_socket.py (revision 84079) +++ Lib/test/test_socket.py (working copy) @@ -608,7 +60

[issue8857] socket.getaddrinfo needs tests

2010-08-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Is there someone who can take a look at this on OSX (Ronald?)? -- ___ Python tracker ___ ___ Pyth

[issue8857] socket.getaddrinfo needs tests

2010-08-15 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue8857] socket.getaddrinfo needs tests

2010-08-15 Thread Florent Xicluna
Florent Xicluna added the comment: test_socket fails on OS X: == ERROR: testGetaddrinfo (test.test_socket.GeneralModuleTests) -- Traceback (most recent call la

[issue8857] socket.getaddrinfo needs tests

2010-08-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Committed in r84024. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ P

[issue8857] socket.getaddrinfo needs tests

2010-08-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: This seems to be related with issue 1282647. Modified patch which skips the test in case of buggy libc version is in attachment. -- Added file: http://bugs.python.org/file18525/getaddrinfo3.patch ___ Python track

[issue8857] socket.getaddrinfo needs tests

2010-08-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Also with python 2.5 which is the system default. -- ___ Python tracker ___ ___ Python-bugs-list

[issue8857] socket.getaddrinfo needs tests

2010-08-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I'm not sure whether it's a problem with my python installation but this is what I get on FreeBSD 7.0 with both python 2.7 and 3.2: >>> import socket >>> socket.getaddrinfo('localhost', 80) Traceback (most recent call last): File "", line 1, in socket.g

[issue8857] socket.getaddrinfo needs tests

2010-08-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've ported the patch to py3k and checked it works under Mandriva Linux and Windows 7 x64. -- versions: -Python 2.6 Added file: http://bugs.python.org/file18485/getaddrinfo3.patch ___ Python tracker

[issue8857] socket.getaddrinfo needs tests

2010-06-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : Removed file: http://bugs.python.org/file17693/getaddrinfotest.patch ___ Python tracker ___ ___ Python-bugs-list

[issue8857] socket.getaddrinfo needs tests

2010-06-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : Removed file: http://bugs.python.org/file17692/getaddrinfotest.patch ___ Python tracker ___ ___ Python-bugs-list

[issue8857] socket.getaddrinfo needs tests

2010-06-17 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > Anyway, getaddrinfo() on FreeBSD/Qemu gives this It seems SOCK_DGRAM is always returned which, as far as I know, doesn't make sense with FTP and SSH protocols. At this point, assuming getaddrinfo() correctly binds the original C function, I'd be for jus

[issue8857] socket.getaddrinfo needs tests

2010-06-17 Thread Stefan Krah
Stefan Krah added the comment: > But why is that an attribute of a socket object? Please pretend I did not write this. ;) Anyway, getaddrinfo() on FreeBSD/Qemu gives this: >>> socket.getaddrinfo('localhost', 21) [(2, 2, 17, '', ('127.0.0.1', 21)), (2, 1, 6, '', ('127.0.0.1', 21)), (2, 5, 1

[issue8857] socket.getaddrinfo needs tests

2010-06-17 Thread Stefan Krah
Stefan Krah added the comment: > Btw, socket.has_ipv6 documentation should be more clear about the fact > that having it == True doesn't necessarily mean IPv6 is actually > supported. Strange indeed. socket.has_ipv6 checks whether ENABLE_IPV6 was defined at compile time. But why is that an attr

[issue8857] socket.getaddrinfo needs tests

2010-06-16 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Forgot to include socket.gaierror in the list of exceptions. New patch in attachment. -- Added file: http://bugs.python.org/file17693/getaddrinfotest.patch ___ Python tracker __

[issue8857] socket.getaddrinfo needs tests

2010-06-16 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : Added file: http://bugs.python.org/file17692/getaddrinfotest.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue8857] socket.getaddrinfo needs tests

2010-06-16 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : Removed file: http://bugs.python.org/file17691/getaddrinfotest.patch ___ Python tracker ___ ___ Python-bugs-list

[issue8857] socket.getaddrinfo needs tests

2010-06-16 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : Removed file: http://bugs.python.org/file17516/getaddrinfotest.patch ___ Python tracker ___ ___ Python-bugs-list

[issue8857] socket.getaddrinfo needs tests

2010-06-16 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > FreeBSD/Qemu: ipv6 is ok, but this fails: [...] That failure refers to this test: # by specifying "http" we expect all returned sockets have # STREAM type infos = socket.getaddrinfo(HOST, "http") for _, socktype, _, _, _ in

[issue8857] socket.getaddrinfo needs tests

2010-06-14 Thread Stefan Krah
Stefan Krah added the comment: FreeBSD/Qemu: ipv6 is ok, but this fails: == FAIL: testGetaddrinfo (__main__.GeneralModuleTests) -- Traceback (most recent call

[issue8857] socket.getaddrinfo needs tests

2010-06-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Does that mean has_ipv6() is broken maybe? I've just tested it against a Windows XP sp3 without IPv6 installed (socket.has_ipv6 returns True thought) and it doesn't fail. -- ___ Python tracker

[issue8857] socket.getaddrinfo needs tests

2010-06-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Testing the patch under a Windows XP Qemu virtual machine gives the following error. Works fine under 64-bit Linux. == ERROR: testGetaddrinfo (test.test_socket.GeneralModuleTests)

[issue8857] socket.getaddrinfo needs tests

2010-06-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: A patch which adds some basic tests is in attachment. It basically tests what told in the documentation without going too deeper. -- Added file: http://bugs.python.org/file17516/getaddrinfotest.patch ___ Python tr

[issue8857] socket.getaddrinfo needs tests

2010-05-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the comments. Other functions use "translate" too (gethostbyname, getservbyname, etc.), so I preferred to keep it for consistency. I've now committed the doc patch. -- ___ Python tracker

[issue8857] socket.getaddrinfo needs tests

2010-05-31 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: About the doc patch: I like the word "Resolves" more than "Translate". "Resolves" implies possible network activity to me. "Translate" sounds like it's just a change in representation. Of course, things like `AI_NUMERICHOST` complicate things, since t

[issue8857] socket.getaddrinfo needs tests

2010-05-30 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file17503/doc-getaddrinfo.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue8857] socket.getaddrinfo needs tests

2010-05-30 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file17502/doc-getaddrinfo.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue8857] socket.getaddrinfo needs tests

2010-05-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a possible doc patch for getaddrinfo(). Comments? -- keywords: +patch Added file: http://bugs.python.org/file17502/doc-getaddrinfo.patch ___ Python tracker

[issue8857] socket.getaddrinfo needs tests

2010-05-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: It also needs better documentation, by the way. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue8857] socket.getaddrinfo needs tests

2010-05-30 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +exarkun, giampaolo.rodola, mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue8857] socket.getaddrinfo needs tests

2010-05-30 Thread Antoine Pitrou
New submission from Antoine Pitrou : socket.getaddrinfo has no tests at all. This should be fixed. -- components: Library (Lib), Tests messages: 106767 nosy: pitrou priority: high severity: normal status: open title: socket.getaddrinfo needs tests type: behavior versions: Python 2.6, Pyt