bpo-36921: Deprecate @coroutine and yield from in asyncio by asvetlov · Pull Request #13334 · python/cpython (original) (raw)

Some deprecation warnings with ./python.exe -Werror -m test -j4 . test_typing also has a usage of @coroutine

. I used a non-ssl build so I might have missed something.

======================================================================
ERROR: test_handle_repr (test.test_asyncio.test_events.HandleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_events.py", line 2140, in test_handle_repr
    cb = asyncio.coroutine(noop)
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/coroutines.py", line 114, in coroutine
    warnings.warn("@coroutine decorator is deprecated, "
DeprecationWarning: @coroutine decorator is deprecated, please use async def function instead

======================================================================
ERROR: test_iter (test.test_asyncio.test_futures.CFutureTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_futures.py", line 376, in test_iter
    test()
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_futures.py", line 373, in test
    arg1, arg2 = coro()
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_futures.py", line 370, in coro
    yield from fut
DeprecationWarning: yield from fut is deprecated, please use await fut instead

======================================================================
ERROR: test_uninitialized (test.test_asyncio.test_futures.CFutureTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_futures.py", line 196, in test_uninitialized
    iter(fut)
DeprecationWarning: yield from fut is deprecated, please use await fut instead

======================================================================
ERROR: test_iter (test.test_asyncio.test_futures.CSubFutureTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_futures.py", line 376, in test_iter
    test()
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_futures.py", line 373, in test
    arg1, arg2 = coro()
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_futures.py", line 370, in coro
    yield from fut
DeprecationWarning: yield from fut is deprecated, please use await fut instead

======================================================================
ERROR: test_uninitialized (test.test_asyncio.test_futures.CSubFutureTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_futures.py", line 196, in test_uninitialized
    iter(fut)
DeprecationWarning: yield from fut is deprecated, please use await fut instead

======================================================================
ERROR: test_iter (test.test_asyncio.test_futures.PyFutureTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_futures.py", line 376, in test_iter
    test()
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_futures.py", line 373, in test
    arg1, arg2 = coro()
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_futures.py", line 370, in coro
    yield from fut
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/futures.py", line 264, in __iter__
    warnings.warn("yield from fut is deprecated, please use await fut instead",
DeprecationWarning: yield from fut is deprecated, please use await fut instead

======================================================================
ERROR: test_uninitialized (test.test_asyncio.test_futures.PyFutureTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_futures.py", line 196, in test_uninitialized
    iter(fut)
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/futures.py", line 264, in __iter__
    warnings.warn("yield from fut is deprecated, please use await fut instead",
DeprecationWarning: yield from fut is deprecated, please use await fut instead

======================================================================
ERROR: test_exception_waiter (test.test_asyncio.test_streams.StreamTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_streams.py", line 592, in test_exception_waiter
    def set_err():
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/coroutines.py", line 114, in coroutine
    warnings.warn("@coroutine decorator is deprecated, "
DeprecationWarning: @coroutine decorator is deprecated, please use async def function instead

----------------------------------------------------------------------
Ran 2071 tests in 69.820s

FAILED (errors=8, skipped=102)