mirror of
https://github.com/python/cpython.git
synced 2025-08-28 04:35:02 +00:00
bpo-32311: Implement asyncio.create_task() shortcut (#4848)
* Implement functionality * Add documentation
This commit is contained in:
parent
19a44f63c7
commit
f74ef458ab
12 changed files with 201 additions and 95 deletions
|
@ -28,6 +28,7 @@ except ImportError: # pragma: no cover
|
|||
|
||||
from asyncio import base_events
|
||||
from asyncio import events
|
||||
from asyncio import format_helpers
|
||||
from asyncio import futures
|
||||
from asyncio import tasks
|
||||
from asyncio.log import logger
|
||||
|
@ -429,7 +430,7 @@ class MockPattern(str):
|
|||
|
||||
|
||||
def get_function_source(func):
|
||||
source = events._get_function_source(func)
|
||||
source = format_helpers._get_function_source(func)
|
||||
if source is None:
|
||||
raise ValueError("unable to get the source of %r" % (func,))
|
||||
return source
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue