Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_asyncio fails on Android upon calling getaddrinfo() #72748

Closed
xdegaye mannequin opened this issue Oct 30, 2016 · 5 comments
Closed

test_asyncio fails on Android upon calling getaddrinfo() #72748

xdegaye mannequin opened this issue Oct 30, 2016 · 5 comments
Labels
3.7 tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@xdegaye
Copy link
Mannequin

xdegaye mannequin commented Oct 30, 2016

BPO 28562
Nosy @vstinner, @xdegaye, @1st1
Files
  • getaddrinfo.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-10-22.20:05:59.046>
    created_at = <Date 2016-10-30.16:52:43.378>
    labels = ['3.7', 'type-bug', 'tests']
    title = 'test_asyncio fails on Android upon calling getaddrinfo()'
    updated_at = <Date 2019-10-22.20:05:59.044>
    user = 'https://github.com/xdegaye'

    bugs.python.org fields:

    activity = <Date 2019-10-22.20:05:59.044>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-10-22.20:05:59.046>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2016-10-30.16:52:43.378>
    creator = 'xdegaye'
    dependencies = []
    files = ['45279']
    hgrepos = []
    issue_num = 28562
    keywords = ['patch']
    message_count = 5.0
    messages = ['279731', '306669', '355044', '355132', '355146']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'xdegaye', 'yselivanov']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue28562'
    versions = ['Python 3.6', 'Python 3.7']

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Oct 30, 2016

    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/mock.py", line 1179, in patched
        return func(*args, **keywargs)
      File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_asyncio/test_base_events.py", 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/base_events.py", line 449, in run_until_complete
        return future.result()
      File "/sdcard/org.bitbucket.pyona/lib/python3.7/concurrent/futures/thread.py", line 55, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/sdcard/org.bitbucket.pyona/lib/python3.7/socket.py", 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 bpo-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).

    @xdegaye xdegaye mannequin added 3.7 tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Oct 30, 2016
    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Nov 21, 2017

    test_create_connection_service_name does not fail on android-24-x86_64.

    @vstinner
    Copy link
    Member

    vstinner commented Oct 21, 2019

    Is the test still failing on the master branch of Python? Is the patch still needed?

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Oct 22, 2019

    According to my last post on this issue 2 years ago, this test "does not fail on android-24-x86_64". This means that it does not fail on API level 24. IMO the issue may be closed.

    @vstinner
    Copy link
    Member

    vstinner commented Oct 22, 2019

    Ok, thanks Xavier. If someone has an issue with test_asyncio on Android, either reopen this issue or open a new issue ;-)

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant