Skip to content

Commit 4377d82

Browse files
committed
Revert "Employ asyncio.Runner in the asyncio REPL"
This reverts commit 875fd2a.
1 parent 875fd2a commit 4377d82

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
@@ -192,8 +192,8 @@ def interrupt(self) -> None:
192192
from _pyrepl.main import CAN_USE_PYREPL
193193

194194
return_code = 0
195-
runner = asyncio.Runner()
196-
loop = runner.get_loop()
195+
loop = asyncio.new_event_loop()
196+
asyncio.set_event_loop(loop)
197197

198198
repl_locals = {'asyncio': asyncio}
199199
for key in {'__name__', '__package__',
@@ -245,5 +245,4 @@ def interrupt(self) -> None:
245245
break
246246

247247
console.write('exiting asyncio REPL...\n')
248-
runner.close()
249248
sys.exit(return_code)

0 commit comments

Comments
 (0)