classification
Title: test_asyncio emits many warnings when run in debug mode
Type: Stage: resolved
Components: asyncio, Tests Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, vstinner, yselivanov
Priority: normal Keywords: patch

Created on 2018-01-26 11:07 by vstinner, last changed 2018-06-07 15:06 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 7462 merged vstinner, 2018-06-06 23:11
PR 7478 merged vstinner, 2018-06-07 14:03
PR 7483 merged vstinner, 2018-06-07 14:24
Messages (6)
msg310753 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-01-26 11:07
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
msg318099 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-29 21:44
Any progress on this issue? "python3.8 -X dev -m test_asyncio" logs dozens of warnings, so it's hard to spot regressions.
msg318125 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2018-05-29 22:27
I'll look into this.
msg318867 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-06-06 23:30
New changeset 9f04f0df6fdb27190690bda949d213893d14e807 by Victor Stinner in branch 'master':
bpo-32676, test_asyncio: Fix warning in test_error_in_call_soon() (GH-7462)
https://github.com/python/cpython/commit/9f04f0df6fdb27190690bda949d213893d14e807
msg318937 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-06-07 14:19
New changeset 3c417610ad318afecf471d59c53e5ae592740791 by Victor Stinner in branch '3.7':
[3.7] bpo-33789: Backport test_asyncio fixes from master (GH-7478)
https://github.com/python/cpython/commit/3c417610ad318afecf471d59c53e5ae592740791
msg318947 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-06-07 15:06
New changeset 2c8d665ba843fe875a4b8f0ae7c7e9099a06f0dc 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)
https://github.com/python/cpython/commit/2c8d665ba843fe875a4b8f0ae7c7e9099a06f0dc
History
Date User Action Args
2018-06-07 15:06:53vstinnersetmessages: + msg318947
2018-06-07 14:24:26vstinnersetpull_requests: + pull_request7108
2018-06-07 14:20:33vstinnersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-06-07 14:19:03vstinnersetmessages: + msg318937
2018-06-07 14:03:56vstinnersetpull_requests: + pull_request7102
2018-06-06 23:30:41vstinnersetmessages: + msg318867
2018-06-06 23:11:31vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request7085
2018-05-29 22:27:32yselivanovsetmessages: + msg318125
2018-05-29 21:44:47vstinnersetmessages: + msg318099
2018-01-26 11:07:29vstinnercreate