[issue32309] Implement asyncio.create_task() and asyncio.run_in_executor shortcuts

2017-12-13 Thread Andrew Svetlov
Change by Andrew Svetlov : -- assignee: docs@python -> nosy: -docs@python ___ Python tracker ___

[issue32309] Implement asyncio.create_task() and asyncio.run_in_executor shortcuts

2017-12-13 Thread Yury Selivanov
Yury Selivanov added the comment: I don't like the low-level API of run_in_executor. "executor" being the first argument, the inability to pass **kwargs, etc. I'd expect to see a more high-level API, perhaps the one that supports 'async with': async with

[issue32309] Implement asyncio.create_task() and asyncio.run_in_executor shortcuts

2017-12-13 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +4736 stage: -> patch review ___ Python tracker ___

[issue32309] Implement asyncio.create_task() and asyncio.run_in_executor shortcuts

2017-12-13 Thread Andrew Svetlov
New submission from Andrew Svetlov : loop.create_task() and loop.run_in_executor are present very often in user code. But they are require a loop instance, actual call looks like loop = asyncio.get_running_loop() loop.create_task(coro()) The proposal adds