[issue25138] test_socket: socket.EAI_NODATA doesn't exist on FreeBSD

2015-09-21 Thread STINNER Victor
STINNER Victor added the comment: > Looking at this more closely, the check seems to be there just to check if > basic DNS lookups are working. It was added for Issue 12804. One option might > be to replace it with a support.transient_internet() handler: (...) Oh good idea. This context manage

[issue25138] test_socket: socket.EAI_NODATA doesn't exist on FreeBSD

2015-09-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset f13a5b5a2824 by Victor Stinner in branch '3.4': Issue #25138: test_socket.test_idna() uses support.transient_internet() instead https://hg.python.org/cpython/rev/f13a5b5a2824 New changeset a7baccf0b1c2 by Victor Stinner in branch '3.5': Merge 3.4 (t

[issue25138] test_socket: socket.EAI_NODATA doesn't exist on FreeBSD

2015-09-20 Thread Martin Panter
Martin Panter added the comment: Looking at this more closely, the check seems to be there just to check if basic DNS lookups are working. It was added for Issue 12804. One option might be to replace it with a support.transient_internet() handler: # Check for internet access before running tes

[issue25138] test_socket: socket.EAI_NODATA doesn't exist on FreeBSD

2015-09-19 Thread STINNER Victor
STINNER Victor added the comment: It would be better to catch the FreeBSD error code when the hostname is not known. -- ___ Python tracker ___ __

[issue25138] test_socket: socket.EAI_NODATA doesn't exist on FreeBSD

2015-09-19 Thread Martin Panter
Martin Panter added the comment: Actually, None is probably a bad default, since gaierror().errno also defaults to None. Maybe choose some other unlikely non-integer object instead. -- ___ Python tracker _

[issue25138] test_socket: socket.EAI_NODATA doesn't exist on FreeBSD

2015-09-19 Thread Martin Panter
Martin Panter added the comment: Maybe it is good enough use something like this as a workaround, with an appropriate comment: if e.errno == getattr(socket, "EAI_NODATA", None): # Symbol not defined on FreeBSD However I wonder if it would be reasonable to set this constant (and similar unde

[issue25138] test_socket: socket.EAI_NODATA doesn't exist on FreeBSD

2015-09-15 Thread STINNER Victor
New submission from STINNER Victor: test_socket.test_idna() uses socket.EAI_NODATA constant which doesn't exists on FreeBSD. http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/3697/steps/test/logs/stdio ==