Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = None closed_at = <Date 2022-03-24.19:51:47.800> created_at = <Date 2022-03-18.20:44:42.359> labels = ['3.11', 'expert-asyncio'] title = 'Implement asyncio.Runner context manager' updated_at = <Date 2022-03-25.22:26:35.045> user = 'https://github.com/asvetlov'
bugs.python.org fields:
activity = <Date 2022-03-25.22:26:35.045> actor = 'asvetlov' assignee = 'none' closed = True closed_date = <Date 2022-03-24.19:51:47.800> closer = 'asvetlov' components = ['asyncio'] creation = <Date 2022-03-18.20:44:42.359> creator = 'asvetlov' dependencies = [] files = [] hgrepos = [] issue_num = 47062 keywords = ['patch'] message_count = 5.0 messages = ['415527', '415971', '415990', '416016', '416021'] nosy_count = 4.0 nosy_names = ['asvetlov', 'zach.ware', 'yselivanov', 'kumaraditya'] pr_nums = ['31799', '32113'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue47062' versions = ['Python 3.11']
Sometimes asyncio.run() is not enough.
For example, unittest test case needs to call several async functions (setup, test, teardown) from the synchronous code using the same execution context and event loop.
The proposal provides the following:
with Runner() as runner: runner.run(async_func())
New changeset 4119d2d by Andrew Svetlov in branch 'main': bpo-47062: Implement asyncio.Runner context manager (GH-31799) 4119d2d
With this change, Github Actions fails first time and it passes in the second rerun of running asyncio tests.
See https://github.com/python/cpython/runs/5682275663?check_suite_focus=true and main branch.
I believe the error is fixed by bpo-47118
New changeset bad6ffa by Andrew Svetlov in branch 'main': bpo-47062: Rename factory argument to loop_factory (GH-32113) bad6ffa
It seems that this commit broke tests in aiohttp: aio-libs/aiohttp#6757 (comment)
@encukou I have an issue here #93896 and a PR here #94058
Activity
asvetlov commented on Mar 18, 2022
Sometimes asyncio.run() is not enough.
For example, unittest test case needs to call several async functions (setup, test, teardown) from the synchronous code using the same execution context and event loop.
The proposal provides the following:
asvetlov commented on Mar 24, 2022
New changeset 4119d2d by Andrew Svetlov in branch 'main':
bpo-47062: Implement asyncio.Runner context manager (GH-31799)
4119d2d
kumaraditya303 commented on Mar 25, 2022
With this change, Github Actions fails first time and it passes in the second rerun of running asyncio tests.
See https://github.com/python/cpython/runs/5682275663?check_suite_focus=true and main branch.
asvetlov commented on Mar 25, 2022
I believe the error is fixed by bpo-47118
asvetlov commented on Mar 25, 2022
New changeset bad6ffa by Andrew Svetlov in branch 'main':
bpo-47062: Rename factory argument to loop_factory (GH-32113)
bad6ffa
encukou commented on Jun 2, 2022
It seems that this commit broke tests in aiohttp: aio-libs/aiohttp#6757 (comment)
graingert commented on Jun 22, 2022
@encukou I have an issue here #93896 and a PR here #94058