Add eager_tasks parameter to asyncio Runner and run()
未关闭
还没有人认领这个 Issue。
stdlib
topic-asyncio
type-feature
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
Feature or enhancement
Proposal:
We have an agreement that eager tasks should become defaults in asyncio eventually.
This issue implements the first step: it adds opt-in eager_tasks argument to run() function and Runner constructor.
Later we'll deprecate False value and enforce users to switch to eager tasks in their code.
See the linked discussion for details.
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://discuss.python.org/t/make-asyncio-eager-task-factory-default/75164/10
Linked PRs
- gh-128293
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
先阅读链接的 Discourse 讨论,然后在 CPython 的 asyncio 实现中定位 asyncio.run() 和 Runner 构造函数。确认针对 opt-in 参数 eager_tasks 约定的行为,并验证两个入口点都按指定方式接受并应用该参数。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- backend
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100