Skip to content

Commit a2ab55a

Browse files
committed
shutdown_asyncgens is 3.9 only
1 parent 84ac43e commit a2ab55a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/prompt_toolkit/application/_compat.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ def asyncio_run(
6666
try:
6767
_cancel_all_tasks(loop)
6868
loop.run_until_complete(loop.shutdown_asyncgens())
69-
loop.run_until_complete(loop.shutdown_default_executor())
69+
if sys.version_info >= (3, 9):
70+
loop.run_until_complete(loop.shutdown_default_executor())
7071
finally:
7172
if loop_factory is None:
7273
asyncio.set_event_loop(None)

0 commit comments

Comments
 (0)