Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Closed
Description
Deprecate the child watchers system and the policy system in favour ofasyncio.Runner(loop_factory=asyncio.ProactorEventLoop/asyncio.SelectorEventLoop/uvloop.new_event_loop)
that would be deprecating:
asyncio.get_event_loop() # already deprecated unless the loop is running asyncio.set_event_loop() # asyncio.set_event_loop(None) should probably be exemptasyncio.get_event_loop_policy()asyncio.set_event_loop_policy() # asyncio.set_event_loop_policy(None) should probably be exemptasyncio.set_child_watcher()asyncio.get_child_watcher() # `_make_subprocess_transport` will instead attempt to use os.open_pidfd and fallback to starting a thread
I'd also like to introduce a new API:asyncio.EventLoop
implemented as:
if sys.platform == "win32": EventLoop = ProactorEventLoopelse: EventLoop = SelectorEventLoop
asyncio.new_event_loop()
will issue a DeprecationWarning if the current policy is not the default policy, and then in 3 releases become an alias ofasyncio.EventLoop
Originally posted by@graingert in#93896 (comment)
Metadata
Metadata
Assignees
Projects
Status
Done