mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
gh-127949: deprecate asyncio.get_event_loop_policy
(#128053)
This deprecates `asyncio.get_event_loop_policy` and will be removed in Python 3.16.
This commit is contained in:
parent
bad3cdefa8
commit
dbd08fb60d
9 changed files with 40 additions and 26 deletions
|
@ -332,7 +332,7 @@ class WinPolicyTests(WindowsEventsTestCase):
|
|||
asyncio.get_running_loop(),
|
||||
asyncio.SelectorEventLoop)
|
||||
|
||||
old_policy = asyncio.get_event_loop_policy()
|
||||
old_policy = asyncio._get_event_loop_policy()
|
||||
try:
|
||||
asyncio._set_event_loop_policy(
|
||||
asyncio.WindowsSelectorEventLoopPolicy())
|
||||
|
@ -346,7 +346,7 @@ class WinPolicyTests(WindowsEventsTestCase):
|
|||
asyncio.get_running_loop(),
|
||||
asyncio.ProactorEventLoop)
|
||||
|
||||
old_policy = asyncio.get_event_loop_policy()
|
||||
old_policy = asyncio._get_event_loop_policy()
|
||||
try:
|
||||
asyncio._set_event_loop_policy(
|
||||
asyncio.WindowsProactorEventLoopPolicy())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue