ipython / ipython/ipykernel

close_loop coroutine instantiated but never awaited in (old?) asyncio loop integration

オープン
#1,260 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
734
フォーク
412
平均マージ
1日 5時間
マージ済み PR(30日)
8

説明

I was trawling through the source code and I spotted what looks to me like a possible bug here:
https://github.com/ipython/ipykernel/blob/d4a8703593cbe5d82bc955d68543dc623f5b4510/ipykernel/eventloops.py#L455

This instantiates a coroutine that never gets awaited. Calling an async def function just returns a coroutine object and does not start evaluating the function until the coroutine is started.

Additional poking around makes it look like asyncio loop integration here is actually semi-dead code from an era when the tornado event loop and asynio event loop where not the same event loop (tornado < 5?). Seems like this should be cleaned up, as my read is this old asyncio loop integration is not being maintained. Maybe a deprecation warning should be displayed if anyone tries to use `%gui asyncio` or something?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。