asyncio Event Loop does not provide warning about keeping a reference to returned task
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Documentation
The high level asyncio documentation warns that one should save the result of asyncio.create_task as the event loop only keeps weak references to tasks.
This same warning is not seen in the low level Event Loop documentation even though the same rules apply. The example code snippets also do not save a reference which would lead readers to believe it is safe to discard the result of the EventLoop.create_task function when it is not.
Relevant function in the high level documentation: https://docs.python.org/3/library/asyncio-task.html#asyncio.create_task
Relevant function in the low level documentation: https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.create_task
Linked PRs
- gh-155599
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
asyncio.create_task のドキュメントと、リンクされている 2 つのドキュメント URL にある asyncio.loop.create_task セクションを比較します。低レベルの警告とその例を更新し、高レベルのドキュメントにある参照の存続期間に関する指針を反映させたうえで、両方のセクションに一貫性があることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100