MagicStack / MagicStack/uvloop
Empty output when calling Snap command
未关闭
还没有人认领这个 Issue。
- 主要语言
- Cython
- 星标
- 11.9k
- 派生
- 616
- PR 合并指标
- 30 天内没有已合并 PR
描述
- uvloop version: 0.16.0
- Python version: 3.8.10
- Platform: Ubuntu 20.04.3
- Helm version: v3.7.0
- Can you reproduce the bug with
PYTHONASYNCIODEBUGin env?: Yes - Does uvloop behave differently from vanilla asyncio? How?: When calling
helm versionviaasyncio.create_subprocess_exec, vanilla asyncio displays the correct result, while uvloop returns empty stdout.
Steps to reproduce:
Download Helm CLI
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh --version v3.7.0
Run the following Python script
import uvloop
async def _async_helm():
proc = await asyncio.create_subprocess_exec('helm', 'version', stdout=asyncio.subprocess.PIPE)
stdout, _ = await proc.communicate()
print(stdout)
asyncio.run(_async_helm())
# Prints b'version.BuildInfo{Version:"v3.7.0", GitCommit:"eeac83883cb4014fe60267ec6373570374ce770b", GitTreeState:"clean", GoVersion:"go1.16.8"}\n'
uvloop.install()
asyncio.run(_async_helm())
# Prints b''
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从使用 asyncio.create_subprocess_exec 的 Python 复现程序开始,并在 Ubuntu 20.04 上比较使用和不使用 uvloop.install() 时的输出。调查负责捕获 stdout 的子进程路径;当通过 uvloop 调用 helm version 返回与 vanilla asyncio 相同的非空 stdout 时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- helm, python
- 领域
- backend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100