mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-127949: deprecate asyncio.set_event_loop_policy
(#128024)
First step towards deprecating the asyncio policy system. This deprecates `asyncio.set_event_loop_policy` and will be removed in Python 3.16.
This commit is contained in:
parent
559b0e7013
commit
5892853fb7
46 changed files with 81 additions and 67 deletions
|
@ -493,7 +493,7 @@ class BuiltinTest(ComplexesAreIdenticalMixin, unittest.TestCase):
|
|||
asyncio.run(eval(co, globals_))
|
||||
self.assertEqual(globals_['a'], 1)
|
||||
finally:
|
||||
asyncio.set_event_loop_policy(policy)
|
||||
asyncio._set_event_loop_policy(policy)
|
||||
|
||||
def test_compile_top_level_await_invalid_cases(self):
|
||||
# helper function just to check we can run top=level async-for
|
||||
|
@ -530,7 +530,7 @@ class BuiltinTest(ComplexesAreIdenticalMixin, unittest.TestCase):
|
|||
mode,
|
||||
flags=ast.PyCF_ALLOW_TOP_LEVEL_AWAIT)
|
||||
finally:
|
||||
asyncio.set_event_loop_policy(policy)
|
||||
asyncio._set_event_loop_policy(policy)
|
||||
|
||||
|
||||
def test_compile_async_generator(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue