mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-36921: Deprecate @coroutine for sake of async def (GH-13346)
The second attempt. Now deprecate `@coroutine` only, keep `yield from fut` as is. https://bugs.python.org/issue36921
This commit is contained in:
parent
dbacfc2273
commit
68b34a7204
12 changed files with 311 additions and 320 deletions
|
@ -588,8 +588,7 @@ class StreamTests(test_utils.TestCase):
|
|||
stream = asyncio.StreamReader(loop=self.loop,
|
||||
_asyncio_internal=True)
|
||||
|
||||
@asyncio.coroutine
|
||||
def set_err():
|
||||
async def set_err():
|
||||
stream.set_exception(ValueError())
|
||||
|
||||
t1 = asyncio.Task(stream.readline(), loop=self.loop)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue