Title: test_asyncio fails on Android upon calling getaddrinfo()
Type: behavior Stage: patch review
Components: Tests Versions: Python 3.7, Python 3.6
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: xdegaye, yselivanov
Priority: normal Keywords: patch

Created on 2016-10-30 16:52 by xdegaye, last changed 2017-11-21 17:00 by xdegaye.

File name Uploaded Description Edit
getaddrinfo.patch xdegaye, 2016-10-30 16:52 review
Messages (2)
msg279731 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2016-10-30 16:52
The error:
ERROR: test_create_connection_service_name (test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests)
Traceback (most recent call last):
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/unittest/", line 1179, in patched
    return func(*args, **keywargs)
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_asyncio/", line 1209, in test_create_connection_service_name
    t, p = self.loop.run_until_complete(coro)
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/asyncio/", line 449, in run_until_complete
    return future.result()
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/concurrent/futures/", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/sdcard/org.bitbucket.pyona/lib/python3.7/", line 743, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 9] servname not supported for ai_socktype

The same error occurs also in issue 26936.
msg266362 lists the conditions under which getaddrinfo() fails on Android.

With this patch, the test succeeds on both Android API levels 21 and 23 (there is no level 22).
msg306669 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2017-11-21 17:00
test_create_connection_service_name does not fail on android-24-x86_64.
Date User Action Args
2017-11-21 17:00:24xdegayesetmessages: + msg306669
2016-10-30 16:57:53xdegayelinkissue26865 dependencies
2016-10-30 16:52:43xdegayecreate