Issue 33743: test_asyncio raises a deprecation warning (original) (raw)
$ ./python -We -m test -v -m test__register_task_3 test_asyncio ...
ERROR: test__register_task_3 (test.test_asyncio.test_tasks.CIntrospectionTests)
Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_asyncio/test_tasks.py", line 2616, in test__register_task_3 self.assertEqual(asyncio.Task.all_tasks(loop), {task}) PendingDeprecationWarning: Task.all_tasks() is deprecated, use asyncio.all_tasks() instead
====================================================================== ERROR: test__register_task_3 (test.test_asyncio.test_tasks.PyIntrospectionTests)
Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_asyncio/test_tasks.py", line 2616, in test__register_task_3 self.assertEqual(asyncio.Task.all_tasks(loop), {task}) PendingDeprecationWarning: Task.all_tasks() is deprecated, use asyncio.all_tasks() instead
And the test is failed if run with -We.
Any chance we can get this fixed for 3.7.0rc1?
FWIW, as of current 3.7 head (cebd4b009adca6611e92eb337747f59818e941a6), I am also seeing the following warnings (on macOS 10.13):
./bin/python3.7 -m test -w -uall,-largefile -j3 test_asyncio Run tests in parallel using 3 child processes running: test_asyncio (30 sec) 0:00:47 load avg: 1.74 [1/1] test_asyncio passed (47 sec) .../python3.7/test/test_asyncio/test_sslproto.py:602: ResourceWarning: unclosed <ssl.SSLSocket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 62863), raddr=('127.0.0.1', 62864)> pass .../python3.7/test/test_asyncio/functional.py:272: ResourceWarning: unclosed <socket.socket fd=13, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 62871), raddr=('127.0.0.1', 62872)> self._prog(TestSocketWrapper(sock)) .../python3.7/asyncio/sslproto.py:322: ResourceWarning: unclosed transport <asyncio.sslproto._SSLProtocolTransport object at 0x10e092e90> source=self) .../python3.7/test/test_asyncio/test_tasks.py:2612: PendingDeprecationWarning: Task.all_tasks() is deprecated, use asyncio.all_tasks() instead self.assertEqual(asyncio.Task.all_tasks(loop), {task}) .../python3.7/test/test_asyncio/test_tasks.py:2612: PendingDeprecationWarning: Task.all_tasks() is deprecated, use asyncio.all_tasks() instead self.assertEqual(asyncio.Task.all_tasks(loop), {task})
== Tests result: SUCCESS ==
1 test OK.