Skip to content

Commit 9cbbf21

Browse files
committed
Revert "Employ asyncio.Runner in the asyncio REPL"
This reverts commit 92f629b.
1 parent ac134b1 commit 9cbbf21

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/asyncio/__main__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ def interrupt(self) -> None:
187187
from _pyrepl.main import CAN_USE_PYREPL
188188

189189
return_code = 0
190-
runner = asyncio.Runner()
191-
loop = runner.get_loop()
190+
loop = asyncio.new_event_loop()
191+
asyncio.set_event_loop(loop)
192192

193193
repl_locals = {'asyncio': asyncio}
194194
for key in {'__name__', '__package__',
@@ -240,5 +240,4 @@ def interrupt(self) -> None:
240240
break
241241

242242
console.write('exiting asyncio REPL...\n')
243-
runner.close()
244243
sys.exit(return_code)

0 commit comments

Comments
 (0)