Closed
Description
in https://github.com/python/cpython/pull/31799/files#diff-1f2ae0f6c6010caf9d5f1c80cd6033a796ffe2b60554f5df84f554f4a08e622b the calls to asyncio.set_event_loop()
were removed which breaks aiohttp aio-libs/aiohttp#6757 and asyncio.SafeChildWatcher
this looks like an intentional breaking change - and if it is should be documented
Metadata
Metadata
Assignees
Projects
Status
Done
Status
Done
Activity
graingert commentedon Jun 16, 2022
graingert commentedon Jun 16, 2022
I know there were some efforts to deprecate
get/set_event_loop_policy
and child watchers #82772 so I think those Deprecations should be applied beforeasyncio.run/IsolatedAsyncioTestCase
stops calling asyncio.set_event_loop()graingert commentedon Jun 17, 2022
alternatively is there still time to deprecate the child watchers system and the policy system in favor of
asyncio.Runner(loop_factory=asyncio.ProactorEventLoop/asyncio.SelectorEventLoop/uvloop.uvloop.new_event_loop)
before the 3.11 release?that would be deprecating:
asyncio.get_child_watcher()
will remain and will always beasyncio.PidfdChildWatcher
on old kernels andasyncio.ThreadedChildWatcher
on very old kernelsasyncio.new_event_loop()
will issue a DeprecationWarning if the current policy is not the default policy, and then become an alias ofrestore the set_event_loop calls to asyncio.run
graingert commentedon Jun 23, 2022
this is also broken with the PidfdChildWatcher
34 remaining items