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 emits many warnings when run in debug mode #76857

Closed
vstinner opened this issue Jan 26, 2018 · 6 comments
Closed

test_asyncio emits many warnings when run in debug mode #76857

vstinner opened this issue Jan 26, 2018 · 6 comments
Labels
3.7 (EOL) end of life tests Tests in the Lib/test dir topic-asyncio

Comments

@vstinner
Copy link
Member

BPO 32676
Nosy @vstinner, @asvetlov, @1st1
PRs
  • bpo-32676, test_asyncio: Fix warning in test_error_in_call_soon() #7462
  • [3.7] bpo-33789: Backport test_asyncio fixes from master #7478
  • [3.6] bpo-32676, test_asyncio: Fix warning in test_error_in_call_soon() (GH-7462) #7483
  • 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 2018-06-07.14:20:33.325>
    created_at = <Date 2018-01-26.11:07:29.766>
    labels = ['3.7', 'tests', 'expert-asyncio']
    title = 'test_asyncio emits many warnings when run in debug mode'
    updated_at = <Date 2018-06-07.15:06:53.325>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2018-06-07.15:06:53.325>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-06-07.14:20:33.325>
    closer = 'vstinner'
    components = ['Tests', 'asyncio']
    creation = <Date 2018-01-26.11:07:29.766>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32676
    keywords = ['patch']
    message_count = 6.0
    messages = ['310753', '318099', '318125', '318867', '318937', '318947']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'asvetlov', 'yselivanov']
    pr_nums = ['7462', '7478', '7483']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue32676'
    versions = ['Python 3.7']

    @vstinner
    Copy link
    Member Author

    vstinner@apu$ ./python -u -X dev -m test -v test_asyncio 2>&1|tee log

    Tests which emit warnings:

    test__sock_sendfile_native_failure (test.test_asyncio.test_base_events.BaseLoopSendfileTests) ...
    /home/vstinner/prog/python/master/Lib/asyncio/selector_events.py:648: ResourceWarning: unclosed transport <_SelectorSocketTransport fd=11>
    source=self)
    ok

    test_start_tls_client_1 (test.test_asyncio.test_sslproto.SelectorStartTLSTests) ...
    Executing <Handle <TaskWakeupMethWrapper object at 0x7f85fab75838>(<Future finis...events.py:304>) created at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_sslproto.py:202> took 0.205 seconds
    ok

    test_error_in_call_soon (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) ...
    <CoroWrapper BaseTaskTests.test_error_in_call_soon.<locals>.coro() running, defined at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2089, created at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2096> was never yielded from
    Coroutine object created at (most recent call last, truncated to 10 last lines):
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 663, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 615, in run
    testMethod()
    File "/home/vstinner/prog/python/master/Lib/unittest/mock.py", line 1191, in patched
    return func(*args, **keywargs)
    File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py", line 2096, in test_error_in_call_soon
    self.new_task(self.loop, coro())
    ok

    test_error_in_call_soon (test.test_asyncio.test_tasks.CTask_CFuture_SubclassTests) ...
    <CoroWrapper BaseTaskTests.test_error_in_call_soon.<locals>.coro() running, defined at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2089, created at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2096> was never yielded from
    Coroutine object created at (most recent call last, truncated to 10 last lines):
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 663, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 615, in run
    testMethod()
    File "/home/vstinner/prog/python/master/Lib/unittest/mock.py", line 1191, in patched
    return func(*args, **keywargs)
    File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py", line 2096, in test_error_in_call_soon
    self.new_task(self.loop, coro())
    ok

    test_error_in_call_soon (test.test_asyncio.test_tasks.CTask_CFuture_Tests) ...
    <CoroWrapper BaseTaskTests.test_error_in_call_soon.<locals>.coro() running, defined at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2089, created at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2096> was never yielded from
    Coroutine object created at (most recent call last, truncated to 10 last lines):
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 663, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 615, in run
    testMethod()
    File "/home/vstinner/prog/python/master/Lib/unittest/mock.py", line 1191, in patched
    return func(*args, **keywargs)
    File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py", line 2096, in test_error_in_call_soon
    self.new_task(self.loop, coro())
    ok

    test_context_3 (test.test_asyncio.test_tasks.CTask_PyFuture_Tests) ...
    Executing <Handle <TaskWakeupMethWrapper object at 0x7f860261ce98>(<Future finis...events.py:304>) created at /home/vstinner/prog/python/master/Lib/asyncio/futures.py:288> took 5.753 seconds
    ok

    test_error_in_call_soon (test.test_asyncio.test_tasks.CTask_PyFuture_Tests) ...
    <CoroWrapper BaseTaskTests.test_error_in_call_soon.<locals>.coro() running, defined at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2089, created at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2096> was never yielded from
    Coroutine object created at (most recent call last, truncated to 10 last lines):
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 663, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 615, in run
    testMethod()
    File "/home/vstinner/prog/python/master/Lib/unittest/mock.py", line 1191, in patched
    return func(*args, **keywargs)
    File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py", line 2096, in test_error_in_call_soon
    self.new_task(self.loop, coro())
    ok

    test_error_in_call_soon (test.test_asyncio.test_tasks.PyTask_CFutureSubclass_Tests) ...
    <CoroWrapper BaseTaskTests.test_error_in_call_soon.<locals>.coro() running, defined at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2089, created at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2096> was never yielded from
    Coroutine object created at (most recent call last, truncated to 10 last lines):
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 663, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 615, in run
    testMethod()
    File "/home/vstinner/prog/python/master/Lib/unittest/mock.py", line 1191, in patched
    return func(*args, **keywargs)
    File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py", line 2096, in test_error_in_call_soon
    self.new_task(self.loop, coro())
    ok

    test_error_in_call_soon (test.test_asyncio.test_tasks.PyTask_CFuture_Tests) ...
    <CoroWrapper BaseTaskTests.test_error_in_call_soon.<locals>.coro() running, defined at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2089, created at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2096> was never yielded from
    Coroutine object created at (most recent call last, truncated to 10 last lines):
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 663, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 615, in run
    testMethod()
    File "/home/vstinner/prog/python/master/Lib/unittest/mock.py", line 1191, in patched
    return func(*args, **keywargs)
    File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py", line 2096, in test_error_in_call_soon
    self.new_task(self.loop, coro())
    ok

    test_error_in_call_soon (test.test_asyncio.test_tasks.PyTask_PyFuture_SubclassTests) ...
    <CoroWrapper BaseTaskTests.test_error_in_call_soon.<locals>.coro() running, defined at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2089, created at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2096> was never yielded from
    Coroutine object created at (most recent call last, truncated to 10 last lines):
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 663, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 615, in run
    testMethod()
    File "/home/vstinner/prog/python/master/Lib/unittest/mock.py", line 1191, in patched
    return func(*args, **keywargs)
    File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py", line 2096, in test_error_in_call_soon
    self.new_task(self.loop, coro())
    ok

    test_error_in_call_soon (test.test_asyncio.test_tasks.PyTask_PyFuture_Tests) ...
    <CoroWrapper BaseTaskTests.test_error_in_call_soon.<locals>.coro() running, defined at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2089, created at /home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py:2096> was never yielded from
    Coroutine object created at (most recent call last, truncated to 10 last lines):
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122, in run
    test(result)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 663, in __call__
    return self.run(*args, **kwds)
    File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 615, in run
    testMethod()
    File "/home/vstinner/prog/python/master/Lib/unittest/mock.py", line 1191, in patched
    return func(*args, **keywargs)
    File "/home/vstinner/prog/python/master/Lib/test/test_asyncio/test_tasks.py", line 2096, in test_error_in_call_soon
    self.new_task(self.loop, coro())
    ok

    @vstinner vstinner added 3.7 (EOL) end of life tests Tests in the Lib/test dir topic-asyncio labels Jan 26, 2018
    @vstinner
    Copy link
    Member Author

    Any progress on this issue? "python3.8 -X dev -m test_asyncio" logs dozens of warnings, so it's hard to spot regressions.

    @1st1
    Copy link
    Member

    1st1 commented May 29, 2018

    I'll look into this.

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 6, 2018

    New changeset 9f04f0d by Victor Stinner in branch 'master':
    bpo-32676, test_asyncio: Fix warning in test_error_in_call_soon() (GH-7462)
    9f04f0d

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 7, 2018

    New changeset 3c41761 by Victor Stinner in branch '3.7':
    [3.7] bpo-33789: Backport test_asyncio fixes from master (GH-7478)
    3c41761

    @vstinner vstinner closed this as completed Jun 7, 2018
    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 7, 2018

    New changeset 2c8d665 by Victor Stinner in branch '3.6':
    [3.6] bpo-32676, test_asyncio: Fix warning in test_error_in_call_soon() (GH-7462) (GH-7483)
    2c8d665

    @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 (EOL) end of life tests Tests in the Lib/test dir topic-asyncio
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants