[issue32676] test_asyncio emits many warnings when run in debug mode

STINNER Victor report at bugs.python.org
Fri Jan 26 06:07:29 EST 2018


New submission from STINNER Victor <victor.stinner at gmail.com>:

vstinner at 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

----------
components: Tests, asyncio
messages: 310753
nosy: asvetlov, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: test_asyncio emits many warnings when run in debug mode
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32676>
_______________________________________


More information about the Python-bugs-list mailing list